/* News (CZ-6655): the feed and the article page on the same wide, flat shell as the home and /checklists (see ".page--flat" in site.css).
   Loaded by the news pages only, after site.css; every selector here sits under ".news", so it also overrides the older news rules in
   site.css (CZ-6604) without touching the other pages that share a class name. Built from the site tokens (--navy, --font-display,
   --ink, --ink-2, --muted, --accent, --link). The shared header is not part of this: it is above the shell and never styled here. */
.news {
  --news-serif: var(--font-display);
  --news-radius: 14px;
  --n-line: #E4DED2;
  --n-well: #F1EDE4;
  --n-side: 340px;
  --n-gap: 40px;
  padding-top: 22px;
}

/* ---- Shell: the feed (or the article) and a sidebar. The sidebar sits right of it on a wide window and under it on a narrow one. ---- */
.news-layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--n-side); gap: var(--n-gap); align-items: start; }
.news-layout:not(:has(.news-side)) { grid-template-columns: minmax(0, 1fr); }
/* CZ-6670: the article band is the same width as the feed and every other flat page (the column takes what the sidebar leaves); only the
   running text keeps its own readable measure (.post__body, 68ch), never a cap on the grid. */
.news-main { min-width: 0; }
@media (max-width: 1100px) {
  .news-layout { grid-template-columns: minmax(0, 1fr); }
}

/* ---- Header and controls ---- */
.news .news-head { text-align: left; padding: 4px 0 18px; }
.news .news-head__title { font-family: var(--news-serif); font-size: clamp(34px, 3.6vw, 56px); line-height: 1.05; letter-spacing: -0.02em; color: var(--navy); }
.news .news-head__eyebrow { margin: 0 0 6px; }
.news .news-head__sub { margin-top: 10px; font-size: 19px; color: var(--ink-2); max-width: none; }
.news .news-toolbar { margin-bottom: 22px; }
.news .news-search { max-width: 640px; }
.news .topic-bar { margin-left: 0; }
.news .topic-select { min-width: 200px; background: var(--panel); border-color: var(--outline-soft); }
.news .topic-panel { width: min(560px, 100%); right: auto; left: 0; }
.news .news-toolbar:not(.news-toolbar--solo) .topic-panel { left: auto; right: 0; }
.news .news-active { margin: -4px 0 18px; }
.news .news-page-note { text-align: left; margin: -6px 0 16px; }
.news .news-empty { text-align: left; }

/* ---- Featured story: the picture in full on a neutral ground, a headline that wraps in about three lines, then excerpt and button ---- */
.news .feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); margin-bottom: 36px; background: var(--panel);
  border: 1px solid var(--n-line); border-radius: 16px; overflow: hidden; }
.news .feature__media { aspect-ratio: 4 / 3; background: var(--n-well); }
.news .feature__media img { padding: 18px; object-fit: contain; }
.news .feature__body { justify-content: center; gap: 14px; padding: clamp(24px, 2.6vw, 48px); }
.news .feature__title { font-size: clamp(28px, 2.5vw, 42px); line-height: 1.12; overflow-wrap: normal; text-wrap: balance; color: var(--navy); }
.news .feature__title a { color: inherit; }
.news .feature__title a:hover { color: var(--link); }
.news .feature__excerpt { font-size: 18px; line-height: 1.55; -webkit-line-clamp: 4; max-width: 58ch; }
@media (max-width: 760px) {
  .news .feature { grid-template-columns: minmax(0, 1fr); margin-bottom: 28px; }
  .news .feature__body { padding: 20px; }
}

/* ---- Story cards: the picture, topic and date, headline, a short excerpt, the author ---- */
.news .news-posts__title { font-family: var(--news-serif); font-size: clamp(24px, 2vw, 30px); color: var(--navy); margin-bottom: 16px; }
.news .post-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.news .post-card { padding: 0; overflow: hidden; background: var(--panel); border-color: var(--n-line); border-radius: var(--news-radius); }
.news .post-card__media { aspect-ratio: 16 / 10; border-radius: 0; background: var(--n-well); }
.news .post-card__media img { padding: 8px; object-fit: contain; }
.news .post-card__body { padding: 16px 18px 18px; gap: 8px; }
.news .post-card__title { font-size: 20px; line-height: 1.25; color: var(--navy); -webkit-line-clamp: 3; text-wrap: balance; overflow-wrap: break-word; }
.news .post-card__title a { color: inherit; }
.news .post-card__title a:hover { color: var(--link); }
.news .post-card__excerpt { -webkit-line-clamp: 3; line-height: 1.5; }
.news .post-card__meta { order: 5; margin-top: 2px; }
.news .post-card__actions { order: 6; }
@media (max-width: 600px) {
  /* A phone shows a story as a row: a small picture beside topic, date, headline and excerpt, so a page is a scannable list, not a long scroll. */
  .news .post-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .news .post-card { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: start; }
  .news .post-card__media { grid-column: 1; grid-row: 1; aspect-ratio: 1; margin: 14px 0 14px 14px; border-radius: 10px; }
  .news .post-card__body { grid-column: 1 / -1; grid-row: 1; padding: 14px 16px 16px; }
  .news .post-card__media + .post-card__body { grid-column: 2; padding-left: 14px; }
  .news .post-card__title { font-size: 18px; }
  .news .post-card__excerpt { -webkit-line-clamp: 2; font-size: 14.5px; }
  .news .post-card__actions { display: none; }
  .news .topic-bar, .news .news-search { max-width: none; width: 100%; }
  .news .news-toolbar { flex-direction: column; align-items: stretch; }
  .news .topic-select { width: 100%; height: 48px; }
  .news .topic-panel { left: 0; right: 0; width: auto; }
}
.news .pager { margin-top: 28px; }
.news .pager .btn { min-height: 44px; display: inline-flex; align-items: center; }

/* ---- Sidebar ---- */
.news-side { display: grid; gap: 20px; position: sticky; top: 16px; min-width: 0; }
@media (max-width: 1100px) { .news-side { position: static; margin-top: 36px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); align-items: start; } }
.side-card { background: var(--panel); border: 1px solid var(--n-line); border-radius: var(--news-radius); padding: 20px 22px; }
.side-card__title { font-family: var(--news-serif); font-size: 21px; color: var(--navy); margin-bottom: 14px; }
.side-links { list-style: none; margin: 0; padding: 0; }
.side-links li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 1px solid var(--n-line); }
.side-links li:first-child { border-top: 0; }
.side-links a { display: block; flex: 1; padding: 9px 0; min-height: 40px; color: var(--ink); font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
.side-links a:hover { color: var(--link); text-decoration: underline; }
.side-links__count { font-size: 13px; flex: none; }
.side-card__more { margin-top: 12px; }

/* ---- Article ---- */
.news-article .post { max-width: none; }
.news-article .post__head { gap: 10px; margin-bottom: 18px; }
.news-article .post__head .display { font-family: var(--news-serif); font-size: clamp(32px, 3.2vw, 46px); line-height: 1.1; letter-spacing: -0.015em; color: var(--navy); text-wrap: balance; }
.news-article .post__meta { font-size: 15px; }
.news-article .post__hero { margin: 0 0 18px; display: grid; place-items: center; padding: 18px; background: var(--n-well); border: 1px solid var(--n-line); border-radius: 16px; }
.news-article .post__hero img { width: 100%; max-width: 100%; height: auto; max-height: min(78vh, 680px); object-fit: contain; border: 0; border-radius: 0; }
.post-tags { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.post-tags .pill { background: var(--panel); border: 1px solid var(--n-line); padding: 4px 12px; font-size: 13.5px; font-weight: 500; }
.post-tags a.pill:hover { border-color: var(--outline); }
.news-article .post__body { max-width: 68ch; font-size: 18px; line-height: 1.7; color: var(--ink); }
.news-article .post__body p, .news-article .post__body ul, .news-article .post__body ol { margin: 0 0 18px; color: var(--ink); }
.news-article .post__body h2 { font-family: var(--news-serif); font-size: 29px; line-height: 1.2; margin: 44px 0 12px; color: var(--navy); }
.news-article .post__body h3 { font-family: var(--news-serif); font-size: 23px; line-height: 1.25; margin: 36px 0 10px; color: var(--navy); }
.news-article .post__body h4 { font-size: 18px; margin: 28px 0 8px; color: var(--navy); }
.news-article .post__body ul, .news-article .post__body ol { padding-left: 24px; display: block; }
.news-article .post__body li { margin: 0 0 6px; }
.news-article .post__body blockquote { margin: 24px 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--outline-soft); color: var(--ink-2); font-style: italic; }
.news-article .post__body figure { margin: 24px 0; }
.news-article .post__body img { max-width: 100%; height: auto; }
.news-article .post__body table { display: block; max-width: 100%; overflow-x: auto; }
.news-article .post__body a { overflow-wrap: anywhere; }

.post-shop { max-width: 68ch; margin: 28px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.post-shop__listings { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.news-article .post__hero a { display: grid; place-items: center; width: 100%; }
/* Back to blog and the breadcrumb (CZ-6665/6670): one tidy line each; a long story title is cut with an ellipsis, never wrapped under the trail. */
.post-back { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font-size: 14.5px; font-weight: 600; color: var(--link); text-decoration: none; }
.post-back:hover { text-decoration: underline; }
.news .breadcrumbs ol { flex-wrap: nowrap; }
.news .breadcrumbs li { flex: none; white-space: nowrap; }
.news .breadcrumbs li:last-child { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.btn--shop-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 26px; font-size: 17px; background: var(--brand); color: #FFFFFF; border: 1px solid var(--brand); }
.btn--shop-cta:hover { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }
.btn--ebay { background: var(--accent); border-color: var(--accent); }
.btn--ebay:hover { background: #8F1022; border-color: #8F1022; }
.post-shop__note { margin: 0; }
.post__second { margin: 26px 0 0; display: grid; place-items: center; padding: 18px; background: var(--panel); border: 1px solid var(--n-line); border-radius: 16px; }
.post__second img { max-width: min(100%, 420px); max-height: 420px; width: auto; height: auto; object-fit: contain; }

.post-strip { margin: 0 0 22px; }
.post-strip__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 10px; }
.post-strip__title { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.post-strip__list { list-style: none; margin: 0; padding: 2px 2px 12px; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; }
.post-strip__list li { flex: 0 0 148px; scroll-snap-align: start; }
.post-strip__item { display: grid; gap: 6px; height: 100%; padding: 8px 8px 12px; background: var(--panel); border: 1px solid var(--n-line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.post-strip__item:hover { border-color: var(--outline); }
.post-strip__media { display: grid; place-items: center; aspect-ratio: 1; background: var(--n-well); border-radius: 8px; overflow: hidden; }
.post-strip__media img { width: 100%; height: 100%; object-fit: contain; }
.post-strip__name { font-size: 13.5px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-strip__price { font-size: 13px; color: var(--link); font-weight: 600; }

.post-app { display: flex; align-items: center; gap: 14px; margin: 34px 0 0; padding: 16px 18px; background: #F6EFEA; border: 1px solid var(--n-line); border-radius: 14px; }
.post-app__mark { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--brand); color: #FFFFFF; font-weight: 800; }
.post-app__text { flex: 1; min-width: 0; }
.post-app__title { font-weight: 700; color: var(--navy); }
@media (max-width: 560px) { .post-app { flex-wrap: wrap; } .post-app .btn-blue { width: 100%; } }

.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
.post-nav__link { display: grid; gap: 4px; padding: 14px 18px; background: var(--panel); border: 1px solid var(--n-line); border-radius: 12px; color: var(--ink); text-decoration: none; min-width: 0; }
.post-nav__link:hover { border-color: var(--outline); }
.post-nav__link--older { text-align: right; }
.post-nav__title { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
@media (max-width: 560px) { .post-nav { grid-template-columns: minmax(0, 1fr); } .post-nav__link--older { text-align: left; } }

.post-related { margin-top: 40px; }
.news .post-grid--related { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.news .post-grid--related .post-card__excerpt { -webkit-line-clamp: 2; }
@media (max-width: 600px) { .news .post-grid--related { grid-template-columns: minmax(0, 1fr); } }
