/* Load after styles.css. Editorial features share the community's visual language. */

/* A small, useful reading shelf on the community homepage. */
.editorial-section { container: editorial-shelf / inline-size; margin: 0 0 27px; min-width: 0; }
.editorial-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px 18px; margin: 0 0 15px; }
.editorial-heading > div { min-width: 0; }
.editorial-heading .eyebrow { margin-bottom: 5px; color: #8b7656; font-size: 9px; letter-spacing: 1.4px; }
.editorial-heading h2 { margin: 0 0 5px; color: var(--ink); font-size: 18px; line-height: 1.6; font-weight: 700; letter-spacing: -.25px; }
.editorial-heading p { margin: 0; color: #687261; font-size: 12px; line-height: 1.8; }
.text-link { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; min-height: 34px; padding: 4px 0; color: #8e583b; font-size: 12px; line-height: 1.7; font-weight: 600; text-underline-offset: 4px; }
.text-link:hover { text-decoration: underline; }
.editorial-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; min-width: 0; }
.editorial-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; min-height: 224px; padding: 19px 18px 17px; border: 1px solid #e2e5d8; border-radius: 12px; color: var(--ink); background: #fffefa; text-decoration: none; transition: border-color .18s ease, box-shadow .18s ease; }
.editorial-card:nth-child(3n + 2) { background: #f5f7ef; border-color: #e0e6d5; }
.editorial-card:nth-child(3n) { background: #fbf5ed; border-color: #ebe1d3; }
.editorial-card:hover { border-color: #c5ceb7; box-shadow: 0 5px 17px rgb(44 51 46 / 5%); }
.editorial-topic { display: inline-flex; align-items: center; align-self: flex-start; max-width: 100%; padding: 3px 7px; border-radius: 5px; color: #926039; background: #f4ead8; font-size: 11px; line-height: 1.6; font-weight: 600; overflow-wrap: anywhere; }
.editorial-card:nth-child(3n + 2) .editorial-topic { color: #62784c; background: #e6edda; }
.editorial-card:nth-child(3n) .editorial-topic { color: #a16743; background: #f5e4d4; }
.editorial-card h3 { width: 100%; margin: 0; color: #354030; font-size: 16px; line-height: 1.65; font-weight: 650; letter-spacing: -.15px; overflow-wrap: anywhere; }
.editorial-card p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin: 0; color: #687261; font-size: 13px; line-height: 1.85; }
.editorial-meta { display: block; margin-top: auto; padding-top: 4px; color: #77826a; font-size: 11px; line-height: 1.7; font-variant-numeric: tabular-nums; }
.editorial-section .editorial-card p { -webkit-line-clamp: 2; }
.editorial-card[hidden], .hub-empty[hidden] { display: none !important; }
.editorial-card:focus-visible, .text-link:focus-visible,
.service-button:focus-visible, .primary-button:focus-visible,
.article-toc a:focus-visible, .hub-topic-nav button:focus-visible { outline: 3px solid #bb552e; outline-offset: 4px; }

/* Clearly identified community service, distinct from the editorial content. */
.service-card { min-width: 0; padding: 21px 20px 19px; border: 1px solid #dfdfcc; border-radius: 13px; color: #4d5d43; background: #f0efe2; }
.service-label { display: inline-flex; align-items: center; padding: 3px 7px; margin-bottom: 12px; border: 1px solid #d7dbc6; border-radius: 4px; color: #6c765d; background: #f7f7ef; font-size: 11px; line-height: 1.7; }
.service-card h3 { margin: 0 0 9px; color: #415538; font-size: 22px; line-height: 1.5; font-weight: 700; letter-spacing: -.4px; }
.service-card p { margin: 0 0 16px; color: #626f57; font-size: 13px; line-height: 1.9; }
.service-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid #49624e; border-radius: 8px; color: #fffef7; background: #49624e; font-size: 12px; line-height: 1.7; font-weight: 600; text-align: center; overflow-wrap: anywhere; transition: background .18s ease; }
.service-button:hover { background: #3c5440; }
.service-card > small { display: block; margin-top: 12px; color: #6f7866; font-size: 11px; line-height: 1.9; overflow-wrap: anywhere; }

/* Shared header on standalone reading and topic pages. */
.site-header .header-nav > a.nav-link { display: inline-flex; align-items: center; }
.editorial-page { padding-bottom: 0; }
.editorial-page .site-header { background: #fffefa; }
.editorial-page .header-inner { max-width: 1192px; }
.editorial-page .header-nav { min-width: 0; margin-left: 10px; }
.editorial-page .header-nav .nav-link { display: inline-flex; align-items: center; flex-shrink: 0; min-height: 75px; }
.editorial-page .header-actions .button.secondary { display: inline-flex; }
.editorial-page .header-nav a[aria-current="page"] { color: var(--ink); font-weight: 650; }

/* 760 px reading column plus a quiet, sticky reference sidebar. */
.reading-shell { width: 100%; max-width: 1128px; margin: 0 auto; padding: 30px 32px 62px; }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 9px; margin: 0 0 28px; color: #78826f; font-size: 12px; line-height: 1.8; }
.breadcrumb a { display: inline-block; padding: 4px 0; color: #65735b; text-underline-offset: 4px; }
.breadcrumb a:hover { color: #a24d2f; text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: #3f4d37; }
.reading-article { min-width: 0; }
.article-header { max-width: 760px; padding-bottom: 26px; margin: 0 0 33px; border-bottom: 1px solid #dfe5d5; }
.article-kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 13px; color: #a4613a; font-size: 12px; line-height: 1.7; font-weight: 650; letter-spacing: .5px; }
.article-header h1 { margin: 0 0 20px; color: #2f3a2b; font-size: clamp(29px, 3.15vw, 40px); line-height: 1.45; letter-spacing: -.7px; font-weight: 750; text-wrap: balance; overflow-wrap: anywhere; }
.article-lead { margin: 0 0 21px; color: #65705c; font-size: 17px; line-height: 1.9; }
.article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 12px; margin: 0; color: #78846e; font-size: 12px; line-height: 1.8; }
.article-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.article-meta svg { width: 14px; height: 14px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 760px) 256px; align-items: start; gap: 48px; min-width: 0; }
.article-body { width: 100%; min-width: 0; max-width: 760px; color: #46533d; font-size: 17px; line-height: 1.95; overflow-wrap: anywhere; }
.reading-section { margin: 0 0 35px; scroll-margin-top: 106px; }
.reading-section:last-child { margin-bottom: 0; }
.article-body h2 { margin: 0 0 15px; color: #35432d; font-size: 24px; line-height: 1.6; font-weight: 680; letter-spacing: -.35px; scroll-margin-top: 106px; }
.article-body h3 { margin: 25px 0 11px; color: #415036; font-size: 19px; line-height: 1.7; font-weight: 650; scroll-margin-top: 106px; }
.article-body p { margin: 0 0 18px; }
.article-body p:last-child { margin-bottom: 0; }
.article-body strong { color: #36472d; font-weight: 650; }
.article-body ul, .article-body ol { margin: 16px 0 22px; padding-left: 1.35em; }
.article-body li { padding-left: 3px; margin: 8px 0; }
.article-body li::marker { color: #8d9c79; }
.article-body li > p { margin-bottom: 10px; }
.article-body a { color: #ad4d2d; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; overflow-wrap: anywhere; }
.article-body a:hover { color: #863919; }
.article-body hr { height: 1px; margin: 30px 0; border: 0; background: #e0e6d6; }
.reading-callout { margin: 24px 0; padding: 18px 22px; border-left: 3px solid #a5b38d; border-radius: 0 10px 10px 0; color: #526449; background: #edf2e4; font-size: 16px; line-height: 1.95; white-space: pre-line; overflow-wrap: anywhere; }
.reading-callout > :first-child { margin-top: 0; }
.reading-callout > :last-child { margin-bottom: 0; }
.reading-callout h2, .reading-callout h3 { font-size: 17px; line-height: 1.8; }
.reading-callout p + p { margin-top: 12px; }
.source-list { margin: 30px 0 0; padding: 20px 22px; border: 1px solid #dfe5d4; border-radius: 11px; color: #667459; background: #fafbf6; font-size: 14px; line-height: 1.9; }
.article-body .source-list { font-size: 14px; }
.source-list h2, .source-list h3 { margin: 0 0 12px; color: #4c5e40; font-size: 16px; line-height: 1.7; }
.source-list p { margin: 0 0 12px; font-size: 14px; }
.source-list ul, .source-list ol { margin: 0; padding-left: 18px; }
.source-list li { margin: 9px 0; padding-left: 1px; }
.source-list > li { list-style: none; }
.article-body ol.source-list { padding-left: 42px; }
ol.source-list > li { list-style: decimal; }
.source-list > li:first-child { margin-top: 0; }
.source-list > li:last-child { margin-bottom: 0; }
.source-list a { color: #8b5637; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.source-list small { display: block; margin-top: 3px; color: #748067; font-size: 12px; line-height: 1.8; }
.article-aside { position: sticky; top: 103px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.article-toc { display: flex; flex-direction: column; gap: 2px; padding: 18px 18px 16px; border: 1px solid #e0e5d6; border-radius: 11px; background: #fffefa; }
.article-toc h2 { margin: 0 0 11px; color: #677457; font-size: 13px; line-height: 1.7; font-weight: 650; }
.article-toc a { display: block; padding: 7px 0 7px 10px; border-left: 2px solid #e9ede1; color: #68775c; font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.article-toc a:hover { border-color: #d49370; color: #a05835; }
.article-toc a.active, .article-toc a[aria-current="location"] { border-color: #c7774d; color: #a05835; font-weight: 600; }
.article-action { max-width: 760px; margin: 38px 0 0; padding: 26px; border: 1px solid #ebd7c2; border-radius: 13px; background: #fbf0e3; }
.article-action h2 { margin: 0 0 10px; color: #634c34; font-size: 23px; line-height: 1.6; letter-spacing: -.3px; }
.article-action > p { margin: 0 0 18px; color: #7b6b55; font-size: 14px; line-height: 1.9; }
.primary-button, .article-action .primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; max-width: 100%; padding: 11px 18px; border: 1px solid #c94e27; border-radius: 8px; color: white; background: #c94e27; font-size: 14px; line-height: 1.6; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; transition: background .18s ease; }
.primary-button:hover, .article-action .primary-button:hover { color: white; background: #af421f; border-color: #af421f; }
.article-action p.action-note { margin: 14px 0 0; color: #766953; font-size: 12px; line-height: 1.9; }
.related-articles { min-width: 0; margin: 44px 0 0; padding-top: 27px; border-top: 1px solid #e0e5d7; }
.related-articles > h2 { margin: 0 0 18px; color: #38492e; font-size: 22px; line-height: 1.6; }
.related-articles > p { margin: 0 0 18px; color: #687261; font-size: 14px; line-height: 1.8; }
.related-articles .editorial-card { min-height: 216px; }

/* The complete six-article shelf and its topic filter. */
.editorial-hub { width: 100%; max-width: 1128px; margin: 0 auto; padding: 30px 32px 64px; }
.hub-intro { padding: 20px 0 28px; border-bottom: 1px solid #dfe5d6; }
.hub-intro .eyebrow { margin-bottom: 11px; color: #9a704a; font-size: 10px; letter-spacing: 1.6px; }
.hub-intro h1 { margin: 0 0 15px; color: #35412c; font-size: clamp(29px, 3.2vw, 40px); line-height: 1.4; font-weight: 750; letter-spacing: -.7px; }
.hub-intro > p { max-width: 650px; margin: 0; color: #687261; font-size: 16px; line-height: 1.9; }
.hub-topic-nav { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 20px 2px 23px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #cfd7c2 transparent; scroll-padding-left: 4px; }
.hub-topic-nav button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-height: 40px; padding: 9px 14px; border: 1px solid #dfe5d5; border-radius: 8px; color: #657458; background: #fffefa; font-size: 13px; line-height: 1.6; white-space: nowrap; }
.hub-topic-nav button.active, .hub-topic-nav button[aria-pressed="true"], .hub-topic-nav button[aria-selected="true"] { border-color: #c94e27; color: white; background: #c94e27; font-weight: 600; }
.hub-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; min-width: 0; }
.hub-grid .editorial-card { min-height: 250px; padding: 23px; gap: 13px; }
.hub-grid .editorial-card h3 { font-size: 20px; line-height: 1.55; }
.hub-grid .editorial-card p { font-size: 14px; line-height: 1.9; }
.hub-grid .editorial-meta { font-size: 12px; padding-top: 6px; }
.hub-empty { grid-column: 1 / -1; padding: 46px 24px; border: 1px dashed #cfd9c0; border-radius: 12px; color: #697b59; background: #fbfcf7; font-size: 15px; line-height: 1.9; text-align: center; }
.hub-empty h2, .hub-empty h3 { margin: 0 0 9px; color: #4b623e; font-size: 19px; line-height: 1.7; }
.hub-empty p { margin: 0; }
.editorial-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px 24px; max-width: 1128px; margin: 0 auto; padding: 22px 32px 30px; border-top: 1px solid #e0e6d6; color: #748167; font-size: 12px; line-height: 1.8; }
.editorial-footer p { margin: 0; }
.editorial-footer a { color: #687b58; text-underline-offset: 4px; }
.editorial-footer a:hover { text-decoration: underline; }

/* The homepage's available column width changes independently of the viewport. */
@container editorial-shelf (max-width: 650px) {
  .editorial-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .editorial-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; min-height: 0; padding: 14px 16px; }
  .editorial-card .editorial-topic { grid-column: 1; grid-row: 1; justify-self: start; }
  .editorial-card h3 { grid-column: 1 / -1; grid-row: 2; font-size: 16px; }
  .editorial-card p { grid-column: 1 / -1; grid-row: 3; -webkit-line-clamp: 2; }
  .editorial-card .editorial-meta { grid-column: 2; grid-row: 1; align-self: center; margin: 0; padding: 0; font-size: 11px; text-align: right; }
}
@media (max-width: 1040px) {
  .editorial-page .header-inner { gap: 23px; }
  .editorial-page .header-nav { margin-left: 0; gap: 19px; }
  .article-layout { grid-template-columns: minmax(0, 1fr) 226px; gap: 34px; }
  .article-aside { gap: 17px; }
  .article-toc { padding-left: 15px; padding-right: 15px; }
  .article-aside .service-card { padding-left: 17px; padding-right: 17px; }
}
@media (max-width: 980px) {
  .reading-shell, .editorial-hub { max-width: 824px; }
  .article-header { margin-bottom: 25px; }
  .article-layout { display: flex; flex-direction: column; gap: 0; }
  .article-aside { display: contents; }
  .article-toc { display: flex; flex-direction: row; align-items: center; gap: 7px; order: -1; width: 100%; margin-bottom: 26px; padding: 11px 13px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #d0d9c2 transparent; }
  .article-toc h2 { flex-shrink: 0; margin: 0 6px 0 0; font-size: 12px; }
  .article-toc a { flex-shrink: 0; min-height: 40px; padding: 8px 10px; border: 1px solid #e0e7d6; border-radius: 6px; background: white; font-size: 12px; line-height: 1.8; white-space: nowrap; }
  .article-toc a.active, .article-toc a[aria-current="location"] { background: #fff4e8; border-color: #dbb093; }
  .article-body { order: 0; }
  .article-aside > .service-card { order: 1; width: 100%; margin-top: 28px; padding: 21px 23px; }
  .article-aside > .service-card .service-button { width: auto; min-width: 170px; }
  .hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
  .hub-grid .editorial-card { min-height: 245px; }
  .editorial-footer { max-width: 824px; }
}
@media (max-width: 780px) {
  .editorial-page { padding-bottom: 0; }
  .editorial-page .site-header { height: auto; }
  .editorial-page .header-inner { flex-wrap: wrap; gap: 9px 15px; padding: 13px 20px 0; }
  .editorial-page .header-nav { display: flex; align-items: stretch; order: 3; flex: 0 0 calc(100% + 40px); width: calc(100% + 40px); gap: 24px; margin: 0 -20px; padding: 0 20px; min-height: 44px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .editorial-page .header-nav::-webkit-scrollbar { display: none; }
  .editorial-page .header-nav .nav-link { min-height: 44px; font-size: 13px; }
  .editorial-page .header-actions { margin-left: auto; }
  .editorial-page .header-actions .button { min-height: 35px; padding: 7px 10px; font-size: 12px; }
  .reading-shell { padding: 24px 24px 44px; }
  .editorial-hub { padding: 24px 24px 44px; }
  .breadcrumb { margin-bottom: 21px; font-size: 12px; }
  .article-header h1 { font-size: 31px; line-height: 1.5; }
  .article-lead { font-size: 16px; }
  .article-body { font-size: 17px; line-height: 1.95; }
  .reading-section, .article-body h2, .article-body h3 { scroll-margin-top: 122px; }
  .article-body h2 { font-size: 22px; }
  .article-body h3 { font-size: 18px; }
  .article-action { padding: 23px; }
  .article-action h2 { font-size: 21px; }
  .editorial-heading { gap: 12px; }
  .editorial-heading h2 { font-size: 17px; }
  .editorial-footer { padding: 21px 24px 26px; }
  .hub-topic-nav button, .article-toc a { min-height: 44px; }
}
@media (max-width: 640px) {
  .editorial-section { margin-bottom: 24px; }
  .editorial-heading { align-items: flex-start; flex-wrap: wrap; gap: 5px 12px; }
  .editorial-heading .text-link { margin-left: auto; font-size: 12px; }
  .editorial-section .editorial-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .editorial-section .editorial-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; min-height: 0; padding: 14px 15px; }
  .editorial-section .editorial-card .editorial-topic { grid-column: 1; grid-row: 1; justify-self: start; }
  .editorial-section .editorial-card h3 { grid-column: 1 / -1; grid-row: 2; font-size: 16px; }
  .editorial-section .editorial-card p { grid-column: 1 / -1; grid-row: 3; font-size: 13px; -webkit-line-clamp: 1; }
  .editorial-section .editorial-card .editorial-meta { grid-column: 2; grid-row: 1; align-self: center; margin: 0; padding: 0; font-size: 11px; text-align: right; }
  .related-articles .editorial-grid { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .related-articles .editorial-card { min-height: 0; padding: 17px; gap: 8px; }
  .related-articles .editorial-card p { -webkit-line-clamp: 2; }
  .related-articles .editorial-meta { margin-top: 1px; padding-top: 1px; }
  .hub-grid { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .hub-grid .editorial-card { min-height: 0; padding: 21px; gap: 11px; }
  .hub-grid .editorial-card h3 { font-size: 20px; }
  .hub-grid .editorial-card p { -webkit-line-clamp: 2; }
  .hub-grid .editorial-meta { margin-top: 1px; }
}
@media (max-width: 480px) {
  .editorial-page .header-inner { padding-left: 18px; padding-right: 18px; }
  .editorial-page .header-nav { flex-basis: calc(100% + 36px); width: calc(100% + 36px); margin-left: -18px; margin-right: -18px; padding-left: 18px; padding-right: 18px; gap: 23px; }
  .reading-shell, .editorial-hub { padding: 21px 20px 37px; }
  .article-kicker { margin-bottom: 10px; font-size: 12px; }
  .article-header { padding-bottom: 23px; margin-bottom: 21px; }
  .article-header h1 { margin-bottom: 16px; font-size: 28px; line-height: 1.5; letter-spacing: -.5px; }
  .article-lead { font-size: 16px; line-height: 1.9; }
  .article-meta { gap: 5px 9px; font-size: 11px; }
  .article-body { font-size: 16px; line-height: 1.95; }
  .article-body p { margin-bottom: 17px; }
  .article-body h2 { margin-bottom: 13px; font-size: 21px; line-height: 1.65; }
  .reading-section { margin-bottom: 29px; }
  .article-body ul, .article-body ol { padding-left: 1.2em; }
  .reading-callout { margin: 21px 0; padding: 16px 17px; font-size: 15px; line-height: 1.95; }
  .source-list { padding: 17px; font-size: 13px; }
  .article-body .source-list, .source-list p { font-size: 13px; }
  .article-action { margin-top: 30px; padding: 21px 19px; }
  .article-action h2 { font-size: 20px; }
  .article-action .primary-button { width: 100%; }
  .article-aside > .service-card { padding: 20px; }
  .article-aside > .service-card .service-button { width: 100%; }
  .related-articles { margin-top: 32px; padding-top: 23px; }
  .related-articles > h2 { font-size: 20px; }
  .hub-intro { padding: 12px 0 23px; }
  .hub-intro h1 { font-size: 31px; }
  .hub-intro > p { font-size: 15px; }
  .hub-topic-nav { padding-top: 17px; padding-bottom: 20px; }
  .editorial-footer { display: block; padding: 20px 20px 25px; font-size: 11px; }
  .editorial-footer > :not(:first-child) { margin-top: 7px; }
}
@media (max-width: 360px) {
  .editorial-page .header-actions .button.primary { display: inline-flex; }
  .editorial-page .header-actions .button { padding-left: 8px; padding-right: 8px; }
  .article-header h1 { font-size: 26px; }
  .editorial-card .editorial-meta { font-size: 11px; }
  .hub-grid .editorial-card { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .editorial-card, .service-button, .primary-button { transition: none; }
  .editorial-page, .editorial-page * { scroll-behavior: auto; }
}
@media print {
  .editorial-page { background: white; }
  .editorial-page .site-header, .article-aside, .article-action,
  .related-articles, .editorial-footer { display: none !important; }
  .reading-shell { max-width: none; margin: 0; padding: 0; }
  .article-layout { display: block; }
  .article-header, .article-body { max-width: none; }
  .article-header h1 { font-size: 26pt; }
  .article-body { font-size: 11pt; line-height: 1.75; color: black; }
  .article-body h2 { break-after: avoid; }
  .reading-callout, .source-list { break-inside: avoid; background: white; }
}
