html[data-theme="dark"] {
  --bg: #111113;
  --surface: #18181b;
  --surface-2: #202024;
  --text: #f5f5f2;
  --muted: #aaaab0;
  --border: #343438;
}

.container { align-items: stretch; }
.site-header {
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border-color: var(--border);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .025);
}
.header-top-row {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  min-height: 76px;
  margin: 0 auto;
  gap: 24px;
}
.header-utility-left { display: flex; align-items: center; gap: 10px; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.header-icon-button {
  width: 42px;
  height: 42px;
  padding: 10px;
  display: inline-grid;
  place-items: center;
  color: var(--text);
  border: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
}
.header-icon-button span, .header-icon-button svg { width: 20px; height: 20px; }
.header-icon-button svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.header-search { width: min(230px, 100%); justify-self: auto; }
.header-search .search-form__icon { top: 50%; left: 11px; width: 19px; height: 19px; transform: translateY(-50%); }
.header-search input {
  min-height: 42px;
  margin: 0;
  padding: 8px 12px 8px 40px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: .9rem;
}
.header-search input:focus { outline: 0; background: var(--surface-2); }
.logo { justify-self: center; gap: 9px; font-size: clamp(1.75rem, 2.2vw, 2.25rem); letter-spacing: -.065em; }
.logo__mark { width: 34px; height: 34px; flex: 0 0 34px; }
.header-login--icon {
  width: auto;
  min-width: 92px;
  padding: 0 15px;
  gap: 8px;
  border-radius: 2px;
  background: var(--text);
  color: var(--surface);
}
.header-login--icon:hover { background: color-mix(in srgb, var(--text) 86%, var(--accent)); color: var(--surface); }
.header-login__icon { width: 17px; height: 17px; color: currentColor; }
.header-login__label { font-size: .86rem; font-weight: 700; }
.theme-switch { width: 68px; height: 42px; border-radius: 2px; }
.theme-switch__thumb { inset: 5px auto 5px 5px; width: 29px; border-radius: 2px; box-shadow: none; }
html[data-theme="dark"] .theme-switch__thumb { transform: translateX(29px); }
.header-nav-wrap { border-top: 1px solid var(--border); }
.header-nav-rail { grid-template-columns: 170px minmax(0, 1fr) 64px; gap: 0; min-height: 64px; }
.header-date {
  display: grid;
  align-content: center;
  gap: 2px;
  height: 100%;
  padding-right: 20px;
  border-right: 1px solid var(--border);
  font-size: .78rem;
}
.header-date strong { font-size: .82rem; }
.header-date span { color: var(--muted); }
.header-nav-scroll { padding: 0 18px; }
.section-nav { min-height: 64px; padding: 0; gap: clamp(16px, 2.3vw, 34px); justify-content: flex-start; }
.section-nav__link { min-height: 64px; padding: 0; border-radius: 0; color: var(--muted); font-size: .88rem; font-weight: 570; }
.section-nav__link:hover { color: var(--text); background: transparent; }
.section-nav__icon { display: none; }
.header-more-button {
  align-self: stretch;
  border: 0;
  border-left: 1px solid var(--border);
  background: var(--text);
  color: var(--surface);
  font-size: 1rem;
  letter-spacing: .14em;
  cursor: pointer;
}
.header-nav-fade::before, .header-nav-fade::after { display: none; }
.site-main { padding-top: 30px; }

@media (max-width: 820px) {
  .header-top-row { grid-template-columns: 1fr auto 1fr; gap: 12px; padding: 10px 0; }
  .header-search { width: 42px; }
  .header-search input { opacity: 0; width: 42px; cursor: pointer; }
  .header-search:focus-within { position: absolute; z-index: 3; left: 10px; right: 10px; width: auto; background: var(--surface); }
  .header-search:focus-within input { width: 100%; opacity: 1; cursor: text; }
  .header-login__label, .theme-switch, .header-date { display: none; }
  .header-login--icon { width: 42px; min-width: 42px; padding: 0; }
  .header-nav-rail { display: grid; grid-template-columns: minmax(0, 1fr) 54px; gap: 0; }
  .header-nav-scroll { padding: 0; }
  .section-nav { min-height: 54px; padding: 0 14px; }
  .section-nav__link { min-height: 54px; }
}

@media (max-width: 560px) {
  .logo__mark { display: none; }
  .logo { font-size: 1.65rem; }
  .header-icon-button { width: 38px; padding-inline: 7px; }
}

/* ===== NewsPick refinement · performance and public UI ===== */
:root,
html[data-theme="light"],
html[data-theme="dark"] {
  --accent: #35c59b;
  --accent-strong: #249f7c;
  --accent-soft: color-mix(in srgb, #35c59b 12%, transparent);
}

html { scroll-behavior: smooth; }
body { border-top: 3px solid var(--accent); }
.site-header { position: relative; z-index: 50; }
.header-top-row { position: relative; }
.header-utility-left { min-width: 0; }

.header-icon-button {
  width: 46px;
  height: 46px;
  border: 1px solid transparent;
  border-right-color: var(--border);
  border-radius: 8px 0 0 8px;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.header-icon-button:hover,
.header-icon-button[aria-expanded="true"] {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 32%, var(--border));
}
.header-icon-button[aria-expanded="true"] { transform: translateX(2px); }

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 46px;
  height: 46px;
  min-width: 46px;
  margin: 0;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  transition: width .32s cubic-bezier(.22, 1, .36, 1), background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.header-search.is-expanded {
  width: min(560px, 100%);
  background: var(--surface);
  border-color: color-mix(in srgb, var(--accent) 72%, var(--border));
  box-shadow: 0 10px 28px rgba(13, 32, 27, .09), inset 0 0 0 1px color-mix(in srgb, var(--accent) 10%, transparent);
}
.header-search__toggle,
.header-search__close {
  position: relative;
  z-index: 2;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 12px;
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.header-search__toggle:hover,
.header-search.is-expanded .header-search__toggle { color: var(--accent-strong); }
.header-search__toggle svg,
.header-search__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.header-search__close { display: none; }
.header-search.is-expanded .header-search__close { display: inline-grid; }
.header-search input,
.header-search:focus-within input {
  width: 0;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: .96rem;
  transition: opacity .18s ease;
}
.header-search.is-expanded input,
.header-search.is-expanded:focus-within input {
  width: 100%;
  padding: 0 6px;
  opacity: 1;
  pointer-events: auto;
  cursor: text;
  outline: 0;
  background: transparent;
}

.header-login--icon {
  min-height: 46px;
  border-radius: 7px;
  background: var(--accent);
  color: #06271e;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 22%, transparent);
  transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.header-login--icon:hover {
  color: #fff;
  background: var(--accent-strong);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px color-mix(in srgb, var(--accent) 28%, transparent);
}

.theme-switch {
  overflow: hidden;
  border-color: var(--border);
  background: var(--surface);
}
.theme-switch__thumb {
  background: var(--accent);
  box-shadow: none;
}
html:not([data-theme="dark"]) .theme-switch__icon--sun,
html[data-theme="light"] .theme-switch__icon--sun,
html[data-theme="dark"] .theme-switch__icon--moon { color: #fff; }

.header-more-button {
  transition: background .18s ease, color .18s ease;
}
.header-more-button:hover,
.header-more-button[aria-expanded="true"] {
  background: var(--accent);
  color: #06271e;
}
.section-nav__link { position: relative; }
.section-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform .18s ease;
}
.section-nav__link:hover::after,
.section-nav__link.is-active::after { transform: scaleX(1); }
.section-nav__link.is-active { color: var(--text); }
.header-nav-wrap { position: relative; overflow: visible; }

.secondary-menu[hidden] { display: none !important; }
.secondary-menu {
  position: absolute;
  z-index: 70;
  top: calc(100% + 10px);
  right: max(16px, calc((100vw - var(--container)) / 2));
  width: min(560px, calc(100vw - 32px));
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 97%, transparent);
  box-shadow: 0 24px 70px rgba(11, 20, 18, .18);
  opacity: 0;
  transform: translateY(-10px) scale(.985);
  transform-origin: top right;
  transition: opacity .18s ease, transform .18s ease;
  backdrop-filter: blur(18px);
}
.secondary-menu.is-open { opacity: 1; transform: translateY(0) scale(1); }
.secondary-menu__head,
.secondary-menu__footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.secondary-menu__head { margin-bottom: 18px; }
.secondary-menu__head div { display: grid; gap: 3px; }
.secondary-menu__head div > span { color: var(--accent-strong); font-size: .72rem; font-weight: 850; text-transform: uppercase; letter-spacing: .13em; }
.secondary-menu__head strong { font-size: 1.25rem; }
.secondary-menu__head button {
  width: 38px; height: 38px; padding: 10px; border: 1px solid var(--border); border-radius: 10px;
  display: grid; place-items: center; color: var(--muted); background: var(--surface-2); cursor: pointer;
}
.secondary-menu__head button:hover { color: var(--accent-strong); border-color: var(--accent); }
.secondary-menu__head button svg,
.secondary-menu__grid svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.secondary-menu__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.secondary-menu__grid a {
  min-height: 70px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-2);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.secondary-menu__grid a:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.secondary-menu__grid a > span { width: 22px; height: 22px; flex: 0 0 22px; color: var(--accent-strong); }
.secondary-menu__grid strong { font-size: .91rem; line-height: 1.3; }
.secondary-menu__footer { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: .82rem; }
.secondary-menu__footer a { color: var(--accent-strong); font-weight: 750; }

/* Drawer is shared by desktop and mobile and opens from the burger button. */
.mobile-menu[hidden] { display: none !important; }
.mobile-menu {
  display: block !important;
  background: rgba(6, 14, 12, .48);
  opacity: 0;
  visibility: hidden;
  transition: opacity .24s ease, visibility .24s ease;
  backdrop-filter: blur(4px);
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu__dialog {
  width: min(430px, 92vw);
  max-width: 430px;
  padding: 22px 24px 28px;
  gap: 22px;
  transform: translateX(-102%);
  transition: transform .3s cubic-bezier(.22, 1, .36, 1);
  box-shadow: 24px 0 80px rgba(4, 14, 11, .2);
}
.mobile-menu.is-open .mobile-menu__dialog { transform: translateX(0); }
.mobile-menu__topbar { position: absolute; top: 18px; right: 18px; }
.mobile-menu__brand { justify-items: start; grid-template-columns: auto 1fr; align-items: center; text-align: left; padding-right: 54px; }
.mobile-menu__logo { width: 52px; height: 52px; }
.mobile-menu__brand strong { font-size: 1.5rem; }
.mobile-menu__heading { color: var(--accent-strong); }
.mobile-menu__nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mobile-menu__link,
.mobile-menu__action,
.mobile-menu__theme {
  min-height: 50px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--surface-2);
  font-size: .88rem;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.mobile-menu__link:hover,
.mobile-menu__action:hover { color: var(--accent-strong); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 26%, var(--border)); transform: translateX(2px); }
.mobile-menu__link-icon { color: var(--accent-strong); }
.mobile-menu__actions { grid-template-columns: 1fr; }
.mobile-menu__action--login { background: var(--accent); color: #06271e; font-weight: 800; }
.mobile-menu__theme { background: var(--surface-2); }
.mobile-menu__footer { text-align: left; border-top: 1px solid var(--border); padding-top: 16px; }

/* Primary accents requested in the reference. */
.newsroom-heading-dot,
.newsroom-most-read-card__number,
.newsroom-read-link,
.newsroom-heading-row > a,
.category-pill,
.article-page__back a,
.popular-item span,
.news-card__stats a { color: var(--accent-strong); }
.newsroom-read-link:hover,
.newsroom-heading-row > a:hover { color: var(--accent); }
.newsroom-heading-dot { background: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }

/* Updated category, search, author, source, favourites and popular listings. */
.category-page,
.search-page { padding: 8px 0 72px; }
.category-layout { gap: 28px; align-items: start; }
.category-main > .section-block--tight,
.search-main > .section-block--tight,
.section-block--plain > .section-head {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 3.4vw, 46px);
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.category-main > .section-block--tight::before,
.search-main > .section-block--tight::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent);
}
.category-main > .section-block--tight h1,
.search-main > .section-block--tight h1,
.section-head--popular h1 { margin: 4px 0 10px; font-size: clamp(2.2rem, 5vw, 4.8rem); line-height: .98; letter-spacing: -.055em; }
.category-main > .section-block--tight .section-lead { max-width: 780px; }
.section-meta { margin-top: 18px; }
.section-meta span { padding: 7px 10px; border-radius: 8px; background: var(--surface-2); }
.filter-tabs { padding: 6px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); box-shadow: 0 8px 24px rgba(12, 22, 19, .04); }
.filter-tab { min-height: 42px; padding: 0 17px; display: inline-flex; align-items: center; border-radius: 9px; font-weight: 720; }
.filter-tab.is-active { background: var(--accent); color: #06271e; }

.news-grid--category { gap: 20px; }
.news-grid--category .news-card--stacked,
.article-related .news-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(13, 25, 21, .045);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.news-grid--category .news-card--stacked:hover,
.article-related .news-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--accent) 44%, var(--border)); box-shadow: 0 20px 44px rgba(13, 25, 21, .09); }
.news-grid--category .news-card__image,
.article-related .news-card__image { margin: 0; border-radius: 0; aspect-ratio: 16 / 9; background: var(--surface-2); }
.news-grid--category .news-card__image img,
.article-related .news-card__image img { width: 100%; height: 100%; object-fit: cover; }
.news-grid--category .news-card__body,
.article-related .news-card__body { padding: 22px; }
.news-grid--category .news-card h3 { font-size: clamp(1.25rem, 2vw, 1.65rem); line-height: 1.15; letter-spacing: -.025em; }
.news-grid--category .category-pill { padding: 0; background: transparent; font-weight: 780; }
.news-grid--category .news-card__stats { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }
.sidebar-column { top: 154px; }
.sidebar-column .widget { border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.sidebar-column .widget h2 { padding-bottom: 16px; border-bottom: 3px solid var(--accent); }
.popular-item { padding: 15px 0; border-bottom: 1px solid var(--border); }
.popular-item:last-child { border-bottom: 0; }

/* Updated article page. */
.article-page { padding: 12px 0 80px; }
.article-page .container { width: min(1240px, calc(100% - 32px)); }
.article-page__layout { align-items: start; }
.article-full {
  padding: clamp(26px, 4.5vw, 64px);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 18px 54px rgba(13, 25, 21, .065);
}
.article-page__back { margin-bottom: -8px; }
.article-page__back a { font-weight: 760; }
.article-full__header { gap: 22px; }
.article-full__title { max-width: 1050px; font-size: clamp(2.35rem, 5.2vw, 5.1rem); line-height: .98; letter-spacing: -.06em; }
.article-full__lead { max-width: 900px; color: var(--muted); font-size: clamp(1.08rem, 2vw, 1.45rem); line-height: 1.55; }
.article-full__meta { padding: 18px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.article-author__avatar { background: var(--accent-soft); color: var(--accent-strong); }
.article-actions-row { margin-top: -6px; }
.favorite-button { border-color: color-mix(in srgb, var(--accent) 34%, var(--border)); }
.favorite-button:hover,
.favorite-button.is-active { background: var(--accent); border-color: var(--accent); color: #06271e; }
.article-full__cover { border-radius: 18px; background: var(--surface-2); }
.article-full__cover img { aspect-ratio: 16 / 9; object-fit: cover; }
.article-full__content { width: min(100%, 820px); margin-inline: auto; color: color-mix(in srgb, var(--text) 91%, var(--muted)); font-size: clamp(1.04rem, 1.45vw, 1.16rem); line-height: 1.86; }
.article-full__content h2 { margin-top: 44px; font-size: clamp(1.8rem, 3vw, 2.75rem); line-height: 1.08; letter-spacing: -.035em; }
.article-full__content h3 { margin-top: 34px; font-size: clamp(1.45rem, 2.4vw, 2rem); line-height: 1.15; }
.article-full__content blockquote { margin: 30px 0; padding: 22px 26px; border-left: 5px solid var(--accent); border-radius: 0 14px 14px 0; background: var(--accent-soft); }
.article-tags,
.article-comments,
.article-related { padding-top: 28px; border-top: 1px solid var(--border); }
.tag-pill { color: var(--accent-strong); background: var(--accent-soft); }
.article-dock { border-color: var(--border); box-shadow: 0 12px 34px rgba(13, 25, 21, .07); }
.article-dock__button:hover { color: var(--accent-strong); background: var(--accent-soft); }

img[data-story-image] { background: var(--surface-2); }
img[data-story-src],
img.is-remote-loading { animation: newspick-preview-pulse 1.35s ease-in-out infinite alternate; }
@keyframes newspick-preview-pulse {
  from { filter: saturate(.82) brightness(.99); }
  to { filter: saturate(.96) brightness(1.045); }
}

@media (max-width: 1100px) {
  .header-search.is-expanded { width: min(390px, 100%); }
  .category-layout { grid-template-columns: 1fr; }
  .sidebar-column { position: static; }
}

@media (max-width: 820px) {
  body { border-top-width: 2px; }
  .header-top-row { grid-template-columns: 1fr auto 1fr; }
  .header-search,
  .header-search:focus-within { position: relative; left: auto; right: auto; width: 42px; background: transparent; }
  .header-search.is-expanded,
  .header-search.is-expanded:focus-within {
    position: absolute;
    z-index: 8;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--surface);
  }
  .header-search input,
  .header-search:focus-within input { width: 0; opacity: 0; pointer-events: none; }
  .header-search.is-expanded input,
  .header-search.is-expanded:focus-within input { width: 100%; opacity: 1; pointer-events: auto; }
  .secondary-menu { right: 10px; width: calc(100vw - 20px); }
  .secondary-menu__grid { grid-template-columns: 1fr; }
  .mobile-menu__nav { grid-template-columns: 1fr; }
  .news-grid--category { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-full { padding: 24px; border-radius: 16px; }
  .article-full__title { font-size: clamp(2.15rem, 10vw, 3.5rem); }
}

@media (max-width: 620px) {
  .secondary-menu__footer { align-items: flex-start; flex-direction: column; }
  .news-grid--category { grid-template-columns: 1fr; }
  .news-grid--category .news-card__body { padding: 18px; }
  .category-main > .section-block--tight,
  .search-main > .section-block--tight { padding: 24px 20px; }
  .article-page .container { width: calc(100% - 16px); }
  .article-full { padding: 20px 16px; }
  .article-full__cover { border-radius: 12px; }
  .article-full__content { font-size: 1rem; line-height: 1.78; }
}
