
/* Shared masthead, navigation and page controls */
header.site {
  position: sticky;
  top: 0;
  box-shadow: 0 1px 0 rgba(255,255,255,.15);
}
html { scroll-padding-top: 115px; }
.skip { position: fixed; }
#main:focus:not(:focus-visible) { outline: none; }
.site .bar { min-height: 76px; height: auto; padding-block: 14px; transition: min-height .2s, padding .2s; }
.site.is-compact .bar { min-height: 60px; padding-block: 7px; }
.site .bar .brand { justify-self: center; }
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy small { margin-top: 4px; color: var(--blue-highlight); font-size: 10px; font-weight: 600; letter-spacing: 0; }
.nav-l { gap: clamp(12px, 1.5vw, 26px); }
.nav-r a:not(.btn), .nav-l > a { display: inline-flex; align-items: center; min-height: 42px; }
.nav-r .search-link { gap: 8px; }
.nav-l > a, .topic-toggle { white-space: nowrap; }
.topic-disclosure { position: relative; }
.topic-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.topic-toggle:hover, .topic-toggle[aria-expanded="true"] { color: var(--blue-highlight); }
.topic-toggle .chevron { transition: transform .18s; }
.topic-toggle[aria-expanded="true"] .chevron { transform: translateY(2px) rotate(225deg); }
.topic-options {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 175px;
  margin: 0;
  padding: 7px;
  list-style: none;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  animation: disclosure-in .14s ease-out;
}
@keyframes disclosure-in { from { opacity: 0; transform: translateY(-4px); } }
.topic-options a {
  display: block;
  border-radius: 6px;
  padding: 10px 12px;
}
.nav-l .topic-options a:is(:hover,:focus-visible,[aria-current]) { color: var(--ink); background: var(--bg); }
.mm:not([hidden]) { display: none; }
.to-top {
  position: fixed;
  z-index: 8;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 10px 15px;
  background: var(--ink);
  color: var(--card);
  box-shadow: var(--shadow);
  font: 700 .8rem var(--font);
  cursor: pointer;
}
.reading-progress {
  position: fixed;
  inset: auto 0 0;
  height: 4px;
  z-index: 11;
  pointer-events: none;
}
.reading-progress span {
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--accent);
}
.read-grid .latest { top: 85px; }

/* Front page and the reusable editorial story card */
.front-page { padding-top: clamp(20px, 3vw, 40px); }
.front-title, .topic-feature > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.front-title { margin-bottom: 17px; padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.front-title h1 { color: var(--ink); font-size: clamp(1.25rem, 2.6vw, 2rem); }
.front-title > a, .topic-feature > header > a { color: var(--accent); font-size: .84rem; font-weight: 700; }
.front-title > a:hover, .topic-feature > header > a:hover { text-decoration: underline; }
.news-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,2.2fr) minmax(0,1.08fr);
  grid-template-areas: "left lead right";
  gap: 20px;
}
.news-lead { grid-area: lead; animation: front-arrival .38s ease-out both; }
@keyframes front-arrival { from { opacity: .75; transform: translateY(6px); } }
.news-left { grid-area: left; display: grid; align-content: start; gap: 14px; }
.news-right {
  grid-area: right;
  align-self: start;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.news-right > h2 { color: var(--ink); font-size: .95rem; margin: 0 0 5px; }
.news-card { min-width: 0; }
.news-card a { display: block; height: 100%; overflow-wrap: anywhere; }
.news-card:not(.headline) a {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: box-shadow .18s ease;
}
.news-card:not(.headline) a:hover { box-shadow: 0 3px 16px rgba(12,26,43,.16); }
.news-media {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 15px 15px 0 0;
  background: var(--bg-2);
}
.news-copy { padding: 13px 15px 16px; }
.article-headline { --headline-scale: .75; }
.news-title { font-size: calc(1.05rem * var(--headline-scale, 1)); line-height: 1.26; color: var(--ink); }
.news-card a:is(:hover,:focus-visible) .news-title { text-decoration: underline; text-underline-offset: .16em; }
.story-meta { color: var(--muted); font-size: .71rem; font-weight: 650; line-height: 1.4; margin-bottom: 6px; }
.story-access { color: var(--ink-2); margin-left: 4px; }
.story-summary {
  margin-top: 7px;
  color: var(--muted);
  font-size: .85rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}
.featured .news-copy { padding: clamp(17px, 2.5vw, 30px); }
.featured .news-title { font: 700 calc(clamp(1.9rem, 3.2vw, 3.35rem) * var(--headline-scale, 1))/1.06 Georgia, serif; letter-spacing: -.035em; }
.featured .story-summary { font-size: 1rem; -webkit-line-clamp: 3; }
.news-right .headline { border-top: 1px solid var(--line); }
.headline .news-copy { padding: 10px 0; }
.headline .news-title { font-size: calc(.92rem * var(--headline-scale, 1)); }
.trending {
  display: flex;
  gap: 12px 20px;
  align-items: baseline;
  margin-top: 22px;
  padding: 12px 16px;
  background: var(--ink-2);
  color: var(--card);
  border-radius: 10px;
}
.trending h2 { font-size: .78rem; color: var(--blue-highlight); white-space: nowrap; }
.trending ul { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; }
.trending a { font-size: .78rem; font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }
.market-strip {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px 20px;
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: .82rem;
}
.market-strip h2 { font-size: .9rem; color: var(--ink); }
.market-strip p, .market-strip dd, .ranking-note { color: var(--muted); }
.market-strip dl { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 0; gap: 9px; }
.market-strip dl div { border-left: 1px solid var(--line); padding-left: 12px; }
.market-strip dt { font-weight: 700; }
.market-strip dd { margin: 0; font-size: .74rem; }
.market-strip dd span { margin-left: .25rem; }
.home-topics { margin-top: 36px; }
.topic-feature, .related-stories { margin-bottom: 32px; }
.topic-feature > header, .related-stories > h2, .reading-desk h2 {
  color: var(--ink);
  border-top: 2px solid var(--ink);
  padding-top: 13px;
  margin-bottom: 13px;
}
.topic-feature h2, .related-stories > h2, .reading-desk h2 { font-size: clamp(1.32rem, 2.6vw, 1.8rem); }
.story-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.reading-desk { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,2.5fr); gap: 20px; margin-block: 46px 16px; }
.popular-list { padding-inline-start: 20px; margin-block: 10px 0; }
.popular-list li { border-bottom: 1px solid var(--line); padding: 6px 0; }
.popular-list a { font-weight: 700; font-size: calc(.88rem * var(--headline-scale, 1)); }
.popular-list a:hover { text-decoration: underline; }
.ranking-note { font-size: .82rem; }
.related-stories { margin-top: 32px; }
.editorial-ad { margin: 24px auto; padding-inline: 0; text-align: center; }
main > .editorial-ad { padding-inline: 24px; }
.editorial-ad p { color: var(--muted); font-size: .7rem; margin-bottom: 3px; }
.ad-frame { height: 90px; max-width: 728px; margin-inline: auto; display: grid; place-items: center; overflow: clip; background: var(--bg-2); }

@media (max-width: 1050px) {
  .site .bar .brand { justify-self: start; }
  .mm:not([hidden]) { display: flex; max-height: min(65vh, 540px); overflow-y: auto; }
  .mm .topic-toggle { width: 100%; }
  .mm .topic-options { position: static; }
  .mm .topic-options a { padding: 8px 12px; }
  .mm .topic-options a:hover { background: var(--bg); }
  .news-grid { grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-areas: "lead lead" "left right"; }
  .news-lead .news-media { max-height: 440px; }
}
@media (max-width: 860px) { .read-grid .latest { top: auto; } }
@media (max-width: 650px) {
  .news-grid { grid-template-columns: minmax(0,1fr); grid-template-areas: "lead" "left" "right"; gap: 15px; }
  .news-left { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .news-left .news-copy { padding: 9px; }
  .news-left .news-title { font-size: calc(.9rem * var(--headline-scale, 1)); }
  .trending, .trending ul { display: grid; gap: 6px; }
  .market-strip { grid-template-columns: 1fr; }
  .market-strip dl { gap: 5px; }
  .market-strip dl div { padding-left: 5px; }
  .reading-desk { grid-template-columns: 1fr; }
  .story-cards { grid-template-columns: 1fr; gap: 12px; }
  .story-cards .news-card a { display: grid; grid-template-columns: 92px minmax(0,1fr); align-items: start; }
  .story-cards .news-media { border-radius: 15px 0 0 0; height: 100%; }
  .story-cards .news-copy { padding: 10px; }
  .grid3 { grid-template-columns: repeat(auto-fill,minmax(min(100%,290px),1fr)); }
}
@media (max-width: 540px) {
  .site .bar { row-gap: 1px; padding-block: 8px 3px; }
  .site.is-compact .bar { padding-block: 4px 1px; }
  .site .bar .brand { gap: 6px; font-size: 18px; }
  .site .bar .mark { width: 29px; height: 29px; }
  .site .nav-r { justify-content: flex-start; gap: 14px; }
  .site .nav-r > a:not(.btn) { min-height: 34px; }
  .menu { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
