/* ============================================================
   Meridian CMS — public theme
   International broadsheet: ink on paper, hairline rules,
   serif display (Newsreader) + Inter for UI.
   ============================================================ */

:root {
  --paper: #ffffff;
  --ink: #141414;
  --ink-2: #3d3d3d;
  --ink-3: #6f6f6f;
  --ink-4: #9a9a9a;
  --rule: #e7e4de;
  --rule-mid: #d5d1c9;
  --accent: #b42318;
  --tint: #faf9f6;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--serif);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  font-size: 17px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--sans); cursor: pointer; }
input, textarea, select { font-family: var(--sans); }

.container { max-width: 1240px; margin: 0 auto; padding: 0 22px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; font-family: var(--sans); font-size: 13px;
}
.skip-link:focus { left: 0; }

.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* ---------------------------------------------------------- top bar */
.topbar {
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-3);
}
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 34px; gap: 16px; }
.topbar-edition { letter-spacing: 0.14em; text-transform: uppercase; font-size: 10.5px; font-weight: 600; }
.topbar-links { display: flex; gap: 16px; }
.topbar-links a:hover { color: var(--ink); }

/* ---------------------------------------------------------- masthead */
.masthead { padding: 26px 0 18px; }
.masthead-in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.masthead-side { display: flex; }
.masthead-right { justify-content: flex-end; }
.masthead-center { text-align: center; }
.logo {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(34px, 5.4vw, 54px);
  letter-spacing: -0.015em;
  line-height: 1;
  display: inline-block;
}
.tagline {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 8px;
}
.icon-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: none; border: none; color: var(--ink-2);
  font-size: 12.5px; font-weight: 600; padding: 8px 4px;
}
.icon-btn:hover { color: var(--accent); }
.btn-subscribe {
  font-family: var(--sans); font-size: 12.5px; font-weight: 600;
  background: var(--ink); color: #fff;
  padding: 9px 18px; border-radius: 2px;
  transition: background 0.15s ease;
}
.btn-subscribe:hover { background: var(--accent); }

/* ---------------------------------------------------------- main nav */
.mainnav { border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); position: relative; }
.mainnav::after {
  content: ""; display: block; height: 1px; background: var(--rule);
  position: absolute; left: 0; right: 0; bottom: -4px;
}
.mainnav-list {
  list-style: none;
  display: flex; justify-content: center; gap: 4px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mainnav-list::-webkit-scrollbar { display: none; }
.mainnav-list a {
  display: block; padding: 11px 12px;
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.mainnav-list a:hover, .mainnav-list a.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------------------------------------------------------- search bar */
.searchbar { border-bottom: 1px solid var(--rule); background: var(--tint); }
.searchbar form { display: flex; gap: 10px; padding: 14px 0; }
.searchbar-input {
  flex: 1; border: 1px solid var(--rule-mid); background: #fff;
  padding: 11px 14px; font-size: 14px; border-radius: 2px; outline: none;
}
.searchbar-input:focus { border-color: var(--ink); }
.searchbar-btn {
  background: var(--ink); color: #fff; border: none;
  padding: 0 22px; font-size: 13px; font-weight: 600; border-radius: 2px;
}

/* ---------------------------------------------------------- ticker */
.ticker { background: var(--accent); color: #fff; }
.ticker-in { display: flex; align-items: center; gap: 14px; height: 38px; }
.ticker-chip {
  background: #fff; color: var(--accent);
  font-family: var(--sans); font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 2px; flex: none;
}
.ticker-track-wrap { overflow: hidden; flex: 1; }
.ticker-track { display: inline-flex; white-space: nowrap; animation: tickerScroll 45s linear infinite; }
.ticker-track:hover { animation-play-state: paused; }
.ticker-item {
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  padding-right: 48px; position: relative;
}
.ticker-item::after { content: "•"; position: absolute; right: 20px; opacity: 0.5; }
.ticker-item:hover { text-decoration: underline; }
@keyframes tickerScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------------------------------------------------------- mini bar */
.minibar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
  transform: translateY(-110%);
  transition: transform 0.25s ease;
}
.minibar.show { transform: translateY(0); }
.minibar-in { display: flex; align-items: center; gap: 24px; height: 50px; }
.minibar-logo { font-family: var(--serif); font-weight: 800; font-size: 20px; letter-spacing: -0.01em; }
.minibar-nav { list-style: none; display: flex; gap: 18px; flex: 1; overflow: hidden; }
.minibar-nav a { font-family: var(--sans); font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.minibar-nav a:hover { color: var(--accent); }

/* ---------------------------------------------------------- kicker / byline */
.kicker {
  display: inline-block;
  font-family: var(--sans); font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px;
}
a.kicker:hover { text-decoration: underline; }
.byline {
  font-family: var(--sans); font-size: 12px; color: var(--ink-3);
  display: flex; align-items: center; gap: 6px; margin-top: 10px;
}
.byline-author { font-weight: 600; color: var(--ink-2); }
.byline-dot { opacity: 0.6; }

/* ---------------------------------------------------------- front page top */
.fp-top {
  display: grid;
  grid-template-columns: 3fr 5.2fr 3fr;
  gap: 0;
  padding-top: 30px;
  padding-bottom: 34px;
}
.fp-col { padding: 0 26px; }
.fp-col:first-child { padding-left: 0; }
.fp-col:last-child { padding-right: 0; }
.fp-lead { border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); }

.lead-story .kicker { font-size: 12px; }
.lead-title {
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.07;
  font-weight: 700;
  letter-spacing: -0.012em;
  margin-bottom: 12px;
}
.lead-title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.lead-deck { font-size: 17.5px; line-height: 1.5; color: var(--ink-2); font-weight: 400; }
.lead-media { display: block; margin-top: 18px; }
.lead-media img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }

.fp-secondary { display: flex; flex-direction: column; gap: 22px; }
.fp-secondary .card + .card { border-top: 1px solid var(--rule); padding-top: 22px; }

/* ---------------------------------------------------------- rail */
.fp-rail { display: flex; flex-direction: column; gap: 26px; }
.rail-block { border-top: 2px solid var(--ink); padding-top: 12px; }
.rail-head {
  font-family: var(--sans); font-size: 12px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 14px;
}
.rail-head-accent { color: var(--accent); }
.mostread { list-style: none; }
.mostread-item { display: flex; gap: 14px; padding: 11px 0; border-top: 1px solid var(--rule); }
.mostread-item:first-child { border-top: none; padding-top: 0; }
.mostread-num {
  font-family: var(--serif); font-size: 26px; font-weight: 500;
  color: var(--rule-mid); line-height: 1; min-width: 24px;
}
.mostread-title { font-size: 15.5px; line-height: 1.28; font-weight: 600; }
.mostread-title a:hover { text-decoration: underline; }
.mostread-meta { font-family: var(--sans); font-size: 11px; color: var(--ink-4); text-transform: uppercase; letter-spacing: 0.08em; }

.opinion-item { padding: 12px 0; border-top: 1px solid var(--rule); }
.opinion-item:first-child { border-top: none; padding-top: 0; }
.opinion-author {
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3);
}
.opinion-title { font-size: 18px; font-style: italic; font-weight: 500; line-height: 1.3; margin-top: 4px; }
.opinion-title a:hover { text-decoration: underline; }

/* ---------------------------------------------------------- sections */
.fp-section { padding: 34px 0 6px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-top: 2px solid var(--ink);
  padding-top: 12px; margin-bottom: 22px;
}
.section-title { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.section-title a:hover { color: var(--accent); }
.section-more { font-family: var(--sans); font-size: 12.5px; font-weight: 600; color: var(--accent); }
.section-more:hover { text-decoration: underline; }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }

/* ---------------------------------------------------------- cards */
.card-media { display: block; margin-bottom: 12px; overflow: hidden; }
.card-media img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; transition: opacity 0.15s ease; }
.card-media:hover img { opacity: 0.92; }
.card-title { font-weight: 700; letter-spacing: -0.008em; }
.card-lg .card-title { font-size: 24px; line-height: 1.15; }
.card-md .card-title { font-size: 19px; line-height: 1.2; }
.card-sm .card-title { font-size: 16.5px; line-height: 1.25; }
.card-title a:hover { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.card-excerpt { font-size: 14px; line-height: 1.5; color: var(--ink-3); margin-top: 7px; font-family: var(--serif); }
.card-lg .card-excerpt { font-size: 15.5px; }

/* category block: lead + stacked minis */
.catblock { display: grid; grid-template-columns: 1.6fr 1fr; gap: 30px; }
.catblock-list { display: flex; flex-direction: column; }
.catblock-list .card { padding: 14px 0; border-top: 1px solid var(--rule); }
.catblock-list .card:first-child { border-top: none; padding-top: 0; }

/* ---------------------------------------------------------- newsletter */
.newsletter { background: var(--tint); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-top: 44px; }
.newsletter-in { text-align: center; padding: 52px 22px; max-width: 620px; }
.newsletter-kicker {
  font-family: var(--sans); font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent);
}
.newsletter-title { font-size: clamp(24px, 3vw, 32px); font-weight: 700; margin: 10px 0 8px; letter-spacing: -0.01em; }
.newsletter-sub { font-size: 15.5px; color: var(--ink-3); }
.newsletter-form { display: flex; gap: 10px; margin: 22px auto 0; max-width: 440px; }
.newsletter-input {
  flex: 1; border: 1px solid var(--rule-mid); background: #fff;
  padding: 12px 14px; font-size: 14px; border-radius: 2px; outline: none;
}
.newsletter-input:focus { border-color: var(--ink); }
.newsletter-btn {
  background: var(--ink); color: #fff; border: none;
  padding: 0 22px; font-size: 13px; font-weight: 600; border-radius: 2px;
  transition: background 0.15s ease;
}
.newsletter-btn:hover { background: var(--accent); }
.newsletter-note { font-family: var(--sans); font-size: 11.5px; color: var(--ink-4); margin-top: 12px; }

/* ---------------------------------------------------------- footer */
.footer { background: var(--ink); color: #b9b9b9; font-family: var(--sans); }
.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  padding: 52px 0 40px;
}
.footer-logo { font-family: var(--serif); font-size: 28px; font-weight: 800; color: #fff; letter-spacing: -0.01em; }
.footer-about { font-size: 13px; line-height: 1.6; margin-top: 12px; max-width: 320px; }
.footer-social { display: flex; gap: 14px; margin-top: 18px; }
.footer-social a { color: #8f8f8f; }
.footer-social a:hover { color: #fff; }
.footer-col h4 {
  color: #fff; font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { font-size: 13px; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid #2c2c2c;
  padding: 18px 0 26px; font-size: 12px; color: #8f8f8f;
}

/* ---------------------------------------------------------- archives */
.archive-head { padding: 40px 0 22px; border-bottom: 2px solid var(--ink); }
.archive-title { font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -0.015em; }
.archive-desc { font-size: 17px; color: var(--ink-2); margin-top: 8px; max-width: 640px; }
.archive-count { font-family: var(--sans); font-size: 12px; color: var(--ink-4); margin-top: 12px; }
.archive-search { display: flex; gap: 10px; margin-top: 18px; max-width: 520px; }
.archive-search input {
  flex: 1; border: 1px solid var(--rule-mid); padding: 11px 14px;
  font-size: 14px; border-radius: 2px; outline: none;
}
.archive-search input:focus { border-color: var(--ink); }
.archive-list { padding-bottom: 30px; }

.listrow {
  display: grid; grid-template-columns: 260px 1fr; gap: 26px;
  padding: 26px 0; border-bottom: 1px solid var(--rule);
}
.listrow-media img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.listrow-title { font-size: 22px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.listrow-title a:hover { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.listrow-excerpt { font-size: 15px; color: var(--ink-3); margin-top: 8px; line-height: 1.55; }

.empty-note { padding: 40px 0; color: var(--ink-3); font-style: italic; }

.pagination { display: flex; gap: 6px; justify-content: center; padding: 30px 0 10px; font-family: var(--sans); }
.page-link {
  min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule-mid); font-size: 13px; font-weight: 600; padding: 0 8px;
}
.page-link:hover { border-color: var(--ink); }
.page-link.current { background: var(--ink); color: #fff; border-color: var(--ink); }
.page-dots { align-self: center; color: var(--ink-4); }

/* ---------------------------------------------------------- article */
.progressbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120; pointer-events: none; }
.progressbar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.1s linear; }

.article { max-width: 760px; padding-top: 40px; }
.article-head { text-align: left; }
.article-title {
  font-size: clamp(30px, 4.6vw, 46px);
  line-height: 1.06; font-weight: 800; letter-spacing: -0.018em;
  margin: 6px 0 14px;
}
.article-deck { font-size: 20px; line-height: 1.45; color: var(--ink-2); font-weight: 400; }
.article-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: 14px 0; margin-top: 22px;
}
.article-author { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: var(--tint); border: 1px solid var(--rule-mid);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 600; font-size: 15px; color: var(--ink-2);
}
.avatar-lg { width: 56px; height: 56px; font-size: 19px; }
.article-author-text { display: flex; flex-direction: column; }
.article-author-name { font-family: var(--sans); font-size: 13.5px; font-weight: 600; }
.article-author-sub { font-family: var(--sans); font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.share { display: flex; gap: 8px; }
.share-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--rule-mid); background: #fff; color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.15s ease;
}
.share-btn:hover { border-color: var(--ink); color: var(--ink); }
.share-btn.copied { background: var(--ink); color: #fff; border-color: var(--ink); }

.article-hero { margin: 28px 0 6px; }
.article-hero img { width: 100%; }
.article-hero figcaption { font-family: var(--sans); font-size: 12px; color: var(--ink-4); padding-top: 8px; }

.prose { font-size: 18.5px; line-height: 1.68; padding: 22px 0 8px; }
.prose p { margin-bottom: 1.25em; }
.prose h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; margin: 1.5em 0 0.6em; line-height: 1.2; }
.prose h3 { font-size: 21px; font-weight: 700; margin: 1.4em 0 0.5em; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose img { margin: 1.4em auto; }
.prose ul, .prose ol { margin: 0 0 1.25em 1.4em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote {
  margin: 1.6em 0; padding: 0.2em 0 0.2em 1.2em;
  border-left: 3px solid var(--accent);
  font-size: 22px; line-height: 1.45; font-style: italic; color: var(--ink-2);
}
.prose:not(.prose-page) > p:first-of-type::first-letter {
  font-size: 3.3em; font-weight: 600; float: left;
  line-height: 0.82; padding: 6px 10px 0 0;
}

.article-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0 6px; }
.tag {
  font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--ink-2);
  border: 1px solid var(--rule-mid); padding: 5px 12px; border-radius: 20px;
}
.tag:hover { border-color: var(--ink); color: var(--ink); }

.authorbox {
  display: flex; gap: 16px; align-items: flex-start;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: 22px 0; margin-top: 26px;
}
.authorbox-name { font-family: var(--sans); font-size: 14px; font-weight: 700; }
.authorbox-bio { font-family: var(--sans); font-size: 13px; color: var(--ink-3); margin-top: 4px; line-height: 1.55; }

/* ---------------------------------------------------------- comments */
.comments { padding: 20px 0 40px; }
.comments-in { max-width: 760px; margin: 0 auto; border-top: 2px solid var(--ink); padding-top: 20px; }
.comments-head { font-size: 21px; font-weight: 700; margin-bottom: 18px; }
.comment { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--rule); }
.comment-meta { display: flex; gap: 10px; align-items: baseline; }
.comment-name { font-family: var(--sans); font-size: 13.5px; font-weight: 700; }
.comment-time { font-family: var(--sans); font-size: 11.5px; color: var(--ink-4); }
.comment-text { font-size: 15.5px; line-height: 1.55; margin-top: 5px; }

.comment-form { margin-top: 26px; background: var(--tint); border: 1px solid var(--rule); padding: 22px; }
.comment-form-head { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.comment-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.comment-form input, .comment-form textarea {
  width: 100%; border: 1px solid var(--rule-mid); background: #fff;
  padding: 11px 13px; font-size: 14px; border-radius: 2px; outline: none; resize: vertical;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--ink); }
.comment-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.comment-form-note { font-family: var(--sans); font-size: 12px; color: var(--ink-4); }

.btn-dark {
  display: inline-block; background: var(--ink); color: #fff; border: none;
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  padding: 11px 22px; border-radius: 2px; transition: background 0.15s ease;
}
.btn-dark:hover { background: var(--accent); }
.btn-line {
  display: inline-block; background: none; color: var(--ink);
  border: 1px solid var(--rule-mid);
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  padding: 10px 22px; border-radius: 2px;
}
.btn-line:hover { border-color: var(--ink); }

/* ---------------------------------------------------------- 404 */
.notfound { text-align: center; padding: 80px 22px 40px; max-width: 640px; }
.notfound-code { font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: 0.2em; color: var(--accent); }
.notfound-title { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.015em; margin: 12px 0; }
.notfound-sub { color: var(--ink-3); font-size: 16px; }
.notfound-actions { display: flex; gap: 12px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }

/* ---------------------------------------------------------- toasts */
.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 150; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--ink); color: #fff;
  font-family: var(--sans); font-size: 13.5px; font-weight: 500;
  padding: 12px 20px; border-radius: 3px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  animation: toastIn 0.3s ease;
}
.toast-error { background: var(--accent); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.toast.hide { opacity: 0; transition: opacity 0.4s ease; }

/* ---------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .fp-top { grid-template-columns: 1fr 1fr; }
  .fp-lead { order: -1; grid-column: 1 / -1; border: none; padding: 0 0 26px; border-bottom: 1px solid var(--rule); margin-bottom: 26px; }
  .fp-col:first-child { padding-right: 26px; }
  .fp-rail { border-left: 1px solid var(--rule); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .masthead { padding: 20px 0 14px; }
  .masthead-in { grid-template-columns: auto 1fr auto; }
  .icon-btn span { display: none; }
  .catblock { grid-template-columns: 1fr; }
  .listrow { grid-template-columns: 150px 1fr; gap: 16px; padding: 20px 0; }
  .listrow-title { font-size: 18px; }
  .listrow-excerpt { display: none; }
  .minibar-nav { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .topbar { font-size: 11px; }
  .topbar-in { height: 30px; }
  .topbar-links { display: none; }

  .masthead { padding: 14px 0 10px; }
  .masthead-in { gap: 8px; }
  .logo { font-size: 31px; }
  .tagline { display: none; }
  .btn-subscribe { padding: 7px 13px; font-size: 11.5px; }
  .icon-btn { padding: 6px 2px; }

  /* the section nav becomes the sticky mobile navigation */
  .mainnav { position: sticky; top: 0; background: var(--paper); z-index: 90; }
  .mainnav-list { justify-content: flex-start; gap: 0; }
  .mainnav-list a { padding: 13px 11px; font-size: 13px; }
  .minibar { display: none; }

  .ticker-in { height: 34px; gap: 10px; }
  .ticker-item { font-size: 12px; }

  .fp-top { grid-template-columns: 1fr; padding-top: 20px; padding-bottom: 22px; }
  .fp-col { padding: 0 !important; border: none !important; }
  .lead-title { font-size: 27px; }
  .lead-deck { font-size: 16px; }
  .lead-media { margin-top: 14px; }
  .fp-secondary { border-top: 1px solid var(--rule); padding-top: 20px !important; margin-top: 22px; gap: 18px; }
  .fp-secondary .card + .card { padding-top: 18px; }
  .fp-rail { margin-top: 24px; }

  /* dense horizontal cards on phones: text left, square thumb right */
  .grid-4, .grid-3 { grid-template-columns: 1fr; gap: 0; }
  .grid-4 .card, .grid-3 .card {
    display: grid; grid-template-columns: 1fr 104px; gap: 14px; align-items: start;
    padding: 14px 0; border-top: 1px solid var(--rule);
  }
  .grid-4 .card:first-child, .grid-3 .card:first-child { border-top: none; padding-top: 0; }
  .grid-4 .card-media, .grid-3 .card-media { margin-bottom: 0; order: 2; }
  .grid-4 .card-media img, .grid-3 .card-media img { aspect-ratio: 1 / 1; }
  .grid-4 .card-body, .grid-3 .card-body { order: 1; }
  .grid-4 .card-excerpt, .grid-3 .card-excerpt { display: none; }
  .card-sm .card-title { font-size: 16px; }
  .catblock-list .card { padding: 12px 0; }

  .fp-section { padding: 24px 0 4px; }
  .section-title { font-size: 19px; }

  .listrow { grid-template-columns: 1fr 104px; gap: 14px; padding: 16px 0; }
  .listrow-media { order: 2; }
  .listrow-media img { aspect-ratio: 1 / 1; }
  .listrow-body { order: 1; }
  .listrow-title { font-size: 16.5px; }

  .archive-head { padding: 24px 0 16px; }
  .archive-title { font-size: 30px; }

  .article { padding-top: 22px; }
  .article-title { font-size: 29px; }
  .article-deck { font-size: 17px; }
  .article-meta { flex-direction: column; align-items: flex-start; gap: 12px; }
  .prose { font-size: 17px; line-height: 1.65; }
  .prose blockquote { font-size: 19px; }
  .comment-form { padding: 16px; }
  .comment-form-row { grid-template-columns: 1fr; }

  .newsletter-in { padding: 38px 18px; }
  .newsletter-form { flex-direction: column; }
  .newsletter-btn { padding: 13px; }

  .footer-top { grid-template-columns: 1fr 1fr; gap: 26px; padding: 36px 0 26px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 6px; padding: 16px 0 22px; }
}
