/*
Theme Name: Newstimes
Description: A fast editorial theme for the Newstimes public site.
Version: 1.4.0
Requires at least: 6.8
Requires PHP: 8.3
Text Domain: newstimes
License: GPL-2.0-or-later
*/

@font-face {
  font-family: "Noto Sans Bengali";
  src: url("assets/fonts/NotoSansBengali-LatinExt.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Noto Sans Bengali";
  src: url("assets/fonts/NotoSansBengali-Latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Noto Sans Bengali";
  src: url("assets/fonts/NotoSansBengali-Bengali.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1, U+11DF0-11DF1;
}

:root {
  color-scheme: light;
  --nt-ink: #111214;
  --nt-body: #202226;
  --nt-muted: #5f6866;
  --nt-paper: #fff;
  --nt-soft: #f8f8f8;
  --nt-border: #ececec;
  --nt-accent: #b80d17;
  --nt-focus: #8f0710;
  --nt-control: #737b79;
  --nt-font: "Noto Sans Bengali", system-ui, sans-serif;
  --nt-content: 1280px;
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --nt-ink: #e5ded2;
  --nt-heading: #fff;
  --nt-body: #e5ded2;
  --nt-muted: #b8b2aa;
  --nt-paper: #17191c;
  --nt-soft: #202226;
  --nt-border: #3a3b40;
  --nt-accent: #ff7b83;
  --nt-focus: #ff7b83;
  --nt-control: #777a80;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --nt-ink: #e5ded2;
    --nt-heading: #fff;
    --nt-body: #e5ded2;
    --nt-muted: #b8b2aa;
    --nt-paper: #17191c;
    --nt-soft: #202226;
    --nt-border: #3a3b40;
    --nt-accent: #ff7b83;
    --nt-focus: #ff7b83;
    --nt-control: #777a80;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--nt-paper);
  color: var(--nt-ink);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  padding-bottom: 48px;
  background: var(--nt-paper);
  color: var(--nt-ink);
  font-family: var(--nt-font);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--nt-accent);
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--nt-focus);
  outline-offset: 3px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.screen-reader-text:focus {
  z-index: 10000;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  clip: auto;
  clip-path: none;
  background: var(--nt-paper);
  color: var(--nt-ink);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 129px;
  background: var(--nt-paper);
}

.masthead {
  position: relative;
  display: flex;
  width: min(100%, var(--nt-content));
  height: 80px;
  margin: 0 auto;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  position: absolute;
  top: 16px;
  left: 50%;
  display: block;
  width: 240px;
  height: 48px;
  transform: translateX(-50%);
}

.brand img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand img.brand-logo-dark {
  display: none;
}

:root[data-theme="dark"] .brand img.brand-logo-light {
  display: none;
}

:root[data-theme="dark"] .brand img.brand-logo-dark {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .brand img.brand-logo-light {
    display: none;
  }

  :root:not([data-theme]) .brand img.brand-logo-dark {
    display: block;
  }
}

.masthead-side {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
}

.mobile-navigation {
  display: none;
}

.mobile-navigation summary {
  display: grid;
  width: 44px;
  height: 44px;
  place-content: center;
  gap: 6px;
  list-style: none;
  cursor: pointer;
}

.mobile-navigation summary::-webkit-details-marker,
.header-search summary::-webkit-details-marker {
  display: none;
}

.mobile-navigation summary::before,
.mobile-navigation summary::after,
.mobile-navigation summary span {
  display: block;
  width: 26px;
  height: 2px;
  background: currentColor;
  content: "";
}

.mobile-navigation-panel {
  position: absolute;
  z-index: 40;
  top: 72px;
  left: 0;
  width: min(360px, 100vw);
  max-height: calc(100dvh - 72px);
  overflow: auto;
  padding: 14px 20px 24px;
  background: var(--nt-paper);
  box-shadow: 0 16px 32px rgb(0 0 0 / 14%);
}

.mobile-menu,
.mobile-menu .sub-menu {
  display: flex;
  margin: 0;
  padding: 0;
  flex-direction: column;
  gap: 0;
  list-style: none;
}

.mobile-menu li {
  display: block;
  border-bottom: 1px solid var(--nt-border);
}

.mobile-menu a {
  display: flex;
  min-height: 48px;
  align-items: center;
  font-size: 17px;
  font-weight: 650;
}

.mobile-menu .sub-menu {
  padding-inline-start: 16px;
}

.header-search {
  position: relative;
}

.header-search summary {
  list-style: none;
  cursor: pointer;
}

.search-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 24px));
  padding: 14px;
  border: 1px solid var(--nt-border);
  background: var(--nt-paper);
  box-shadow: 0 12px 28px rgb(0 0 0 / 12%);
}

.site-date {
  color: var(--nt-body);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.header-action {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--nt-border);
  border-radius: 50%;
  color: var(--nt-body);
}

.header-action svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.theme-toggle {
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.header-login {
  display: inline-flex;
  min-height: 44px;
  padding: 0 14px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--nt-border);
  border-radius: 999px;
  color: var(--nt-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.header-login:hover {
  border-color: var(--nt-accent);
  color: var(--nt-accent);
}

.header-login svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.theme-toggle .theme-icon-dark {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .theme-icon-light {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .theme-icon-dark {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .theme-icon-light {
    display: none;
  }

  :root:not([data-theme]) .theme-toggle .theme-icon-dark {
    display: block;
  }
}

.primary-navigation {
  height: 49px;
  border-block: 1px solid var(--nt-border);
}

.primary-menu,
.primary-menu ul {
  display: flex;
  height: 100%;
  margin: 0;
  padding: 0;
  align-items: stretch;
  gap: clamp(16px, 2.2vw, 36px);
  list-style: none;
}

.primary-menu {
  width: min(calc(100% - 96px), 1640px);
  margin: 0 auto;
  align-items: center;
  justify-content: center;
}

.primary-menu li {
  position: relative;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.primary-menu a {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  font-size: 17px;
  font-weight: 650;
}

.primary-menu .sub-menu {
  position: absolute;
  z-index: 30;
  top: 100%;
  left: -12px;
  display: none;
  width: max-content;
  min-width: 180px;
  height: auto;
  padding: 8px;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--nt-border);
  background: var(--nt-paper);
  box-shadow: 0 12px 28px rgb(0 0 0 / 8%);
}

.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu {
  display: flex;
}

.primary-menu .sub-menu a {
  width: 100%;
  min-height: 40px;
  padding: 6px 10px;
  font-size: 15px;
}

.topic-rail {
  height: 63px;
  overflow: hidden;
  border-bottom: 1px solid var(--nt-border);
  background: var(--nt-paper);
}

.topic-rail-inner {
  display: flex;
  width: min(100%, var(--nt-content));
  height: 54px;
  margin: 0 auto;
  padding: 8px 16px;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.topic-rail-inner::-webkit-scrollbar {
  display: none;
}

.topic-rail-label {
  flex: 0 0 auto;
  color: var(--nt-muted);
  font-size: 14px;
  font-weight: 850;
}

.topic-link {
  display: inline-flex;
  min-height: 34px;
  padding: 7px 13px;
  flex: 0 0 auto;
  align-items: center;
  border: 1px solid var(--nt-border);
  border-radius: 999px;
  background: var(--nt-soft);
  color: var(--nt-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.site-main {
  min-height: 55vh;
}

.content-wrap {
  width: min(calc(100% - 32px), var(--nt-content));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.home-top {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr) minmax(0, 320px);
  gap: 22px;
}

.home-layout--lead-wide .home-top {
  grid-template-areas:
    "lead lead"
    "latest categories";
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  row-gap: 28px;
}

.home-layout--lead-wide .home-center {
  grid-area: lead;
}

.home-layout--lead-wide .home-latest {
  grid-area: latest;
}

.home-layout--lead-wide .home-categories {
  grid-area: categories;
  display: block;
}

.home-latest {
  padding-right: 18px;
  border-right: 1px solid var(--nt-border);
}

.section-title {
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--nt-accent);
  color: var(--nt-heading, var(--nt-ink));
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
}

.story-card {
  min-width: 0;
}

.story-card-title {
  margin: 0;
  color: var(--nt-heading, var(--nt-ink));
  font-size: 18px;
  font-weight: 750;
  line-height: 1.4;
}

.story-card-image {
  display: block;
  overflow: hidden;
  background: var(--nt-soft);
}

.story-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.story-card-image:hover img {
  transform: scale(1.02);
}

.story-card-meta {
  margin-top: 6px;
  color: var(--nt-muted);
  font-size: 12px;
}

.story-card--compact {
  display: grid;
  min-height: 112px;
  padding: 10px 0;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 12px;
  border-bottom: 1px solid var(--nt-border);
}

.story-card--compact .story-card-title {
  font-size: 16px;
}

.story-card--compact .story-card-image {
  grid-column: 2;
  grid-row: 1 / span 2;
  aspect-ratio: 16 / 10;
  border-radius: 4px;
}

.home-lead {
  position: relative;
  min-width: 0;
}

.story-card--lead {
  overflow: hidden;
  border: 1px solid var(--nt-border);
  border-radius: 6px;
  background: var(--nt-soft);
}

.story-card--lead[hidden] {
  display: none;
}

.story-card--lead .story-card-image {
  aspect-ratio: 16 / 9;
}

.story-card--lead .story-card-title {
  padding: 12px 14px 14px;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.4;
}

.home-lead-controls {
  position: relative;
  display: flex;
  margin-top: 12px;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.home-lead-controls > button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--nt-border);
  border-radius: 50%;
  background: var(--nt-paper);
  color: var(--nt-body);
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.home-lead-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-lead-pagination button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--nt-border);
  cursor: pointer;
}

.home-lead-pagination button[aria-current="true"] {
  background: var(--nt-accent);
}

.home-selected {
  margin-top: 26px;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.story-card--grid .story-card-image {
  margin-bottom: 9px;
  aspect-ratio: 16 / 10;
  border-radius: 4px;
}

.story-card--grid .story-card-title {
  font-size: 16px;
}

.category-panel {
  padding: 8px;
  border: 1px solid var(--nt-border);
}

.category-panel .section-title {
  color: var(--nt-muted);
  text-align: center;
}

.category-list {
  display: flex;
  margin: 0;
  padding: 0;
  flex-direction: column;
  list-style: none;
}

.category-list li {
  padding: 11px 6px;
  border-bottom: 1px solid var(--nt-border);
  font-size: 15px;
  font-weight: 700;
}

.category-list li:last-child {
  border-bottom: 0;
}

.home-section {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--nt-border);
}

.home-section-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.archive-heading {
  margin: 0 0 22px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--nt-accent);
  color: var(--nt-heading, var(--nt-ink));
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.25;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 20px;
}

.archive-grid .story-card-image {
  margin-bottom: 10px;
  aspect-ratio: 16 / 10;
  border-radius: 4px;
}

.archive-grid .story-card-title {
  font-size: 19px;
}

.pagination {
  margin-top: 32px;
}

.pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.pagination .page-numbers {
  display: inline-grid;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  place-items: center;
  border: 1px solid var(--nt-border);
  border-radius: 4px;
}

.pagination .current {
  border-color: var(--nt-accent);
  background: var(--nt-accent);
  color: var(--nt-paper);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
}

.article-layout--no-sidebar {
  grid-template-columns: minmax(0, 1fr);
}

.article-header {
  padding: 6px 12px 0;
}

.article-kicker {
  margin: 0 0 8px;
  color: var(--nt-accent);
  font-size: 14px;
  font-weight: 700;
}

.article-title {
  margin: 0;
  color: var(--nt-heading, var(--nt-ink));
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 850;
  line-height: 1.35;
}

.article-deck {
  margin: 14px 0 0;
  color: var(--nt-body);
  font-size: 19px;
  line-height: 1.65;
}

.article-meta {
  display: flex;
  margin-top: 18px;
  padding: 14px 0;
  flex-wrap: wrap;
  gap: 8px 14px;
  border-block: 1px solid var(--nt-border);
  color: var(--nt-muted);
  font-size: 13px;
}

.article-featured-image {
  margin: 20px 0 0;
}

.article-featured-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.article-featured-image figcaption {
  margin-top: 8px;
  color: var(--nt-muted);
  font-size: 13px;
}

.article-content {
  max-width: var(--nt-article-width, 820px);
  margin-top: 28px;
  margin-inline: auto;
  padding: 0 12px;
  font-size: var(--nt-article-font-size, 19px);
  line-height: 1.85;
  text-align: justify;
}

.article-content > :first-child {
  margin-top: 0;
}

.article-content > :last-child {
  margin-bottom: 0;
}

.article-content img,
.article-content video {
  max-width: 100%;
  height: auto;
}

.article-content blockquote {
  margin: 24px 0;
  padding: 14px 18px;
  border-block-start: 2px solid var(--nt-accent);
  background: var(--nt-soft);
  color: var(--nt-body);
  font-size: 1.1em;
}

.article-content a {
  color: var(--nt-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-gallery {
  display: grid;
  margin: 24px 12px 0;
  gap: 20px;
}

.article-gallery-item {
  margin: 0;
}

.article-gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.article-gallery-item figcaption {
  display: flex;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  color: var(--nt-muted);
  font-size: 13px;
}

.article-sidebar {
  padding: 12px;
  background: var(--nt-soft);
}

.article-sidebar .story-card {
  display: grid;
  margin-top: 14px;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.article-sidebar .story-card-image {
  grid-row: 1 / span 2;
  aspect-ratio: 1;
}

.article-sidebar .story-card-title {
  font-size: 14px;
}

.article-tags {
  display: flex;
  margin-top: 24px;
  flex-wrap: wrap;
  gap: 8px;
}

.article-tags a {
  padding: 5px 9px;
  border: 1px solid var(--nt-border);
  border-radius: 4px;
  font-size: 13px;
}

.site-footer {
  padding: 56px 16px 24px;
  background: #191919;
  color: var(--nt-paper);
}

.newstimes-ad-slot {
  width: min(calc(100% - 32px), var(--nt-content));
  margin: 24px auto;
  padding: 10px 0;
  color: var(--nt-muted);
  text-align: center;
}

.newstimes-ad-slot::before {
  display: block;
  margin-bottom: 6px;
  content: "বিজ্ঞাপন";
  font-size: 11px;
  line-height: 1.2;
}

.newstimes-ad-slot > * {
  max-width: 100%;
}

.footer-inner {
  display: grid;
  width: min(100%, var(--nt-content));
  margin: 0 auto;
  grid-template-columns: minmax(200px, 1.15fr) repeat(3, minmax(140px, 1fr));
  gap: 32px;
}

.footer-brand img {
  display: block;
  width: 240px;
  height: auto;
}

.footer-column h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 16px;
}

.footer-column ul,
.footer-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-column li {
  margin-top: 9px;
  color: rgb(255 255 255 / 62%);
  font-size: 14px;
}

.footer-column a,
.footer-legal a {
  color: inherit;
}

.footer-column a:hover,
.footer-legal a:hover {
  color: #fff;
}

.footer-institutional {
  padding-top: 0;
}

.footer-bottom {
  width: min(100%, var(--nt-content));
  margin: 36px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgb(255 255 255 / 18%);
  color: rgb(255 255 255 / 75%);
  font-size: 14px;
}

.footer-legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-legal p {
  margin: 0;
}

.footer-legal ul {
  display: flex;
  margin: 0;
  padding: 0;
  gap: 20px;
  list-style: none;
}

.news-ticker {
  position: relative;
  z-index: 1;
  display: flex;
  height: 48px;
  align-items: center;
  border-top: 1px solid var(--nt-border);
  border-bottom: 1px solid var(--nt-border);
  background: var(--nt-paper);
}

.ticker-label {
  display: grid;
  height: 100%;
  padding: 0 16px;
  flex: 0 0 auto;
  place-items: center;
  background: var(--nt-accent);
  color: var(--nt-paper);
  font-size: 14px;
  font-weight: 800;
}

.news-ticker-window {
  min-width: 0;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.news-ticker-window::-webkit-scrollbar {
  display: none;
}

.ticker-track {
  display: flex;
  width: max-content;
  align-items: center;
}

.ticker-items {
  display: flex;
  padding: 0 24px 0 12px;
  flex: 0 0 auto;
  align-items: center;
  gap: 24px;
  direction: ltr;
}

.ticker-items--duplicate {
  display: none;
}

.ticker-items a {
  flex: 0 0 auto;
  color: var(--nt-muted);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  direction: rtl;
}

.ticker-toggle {
  display: grid;
  width: 40px;
  height: 40px;
  margin-inline: 4px;
  padding: 0;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--nt-border);
  border-radius: 50%;
  background: transparent;
  color: var(--nt-body);
  cursor: pointer;
}

.ticker-toggle[hidden] {
  display: none;
}

.ticker-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.ticker-icon-play,
.news-ticker[data-ticker-paused="true"] .ticker-icon-pause {
  display: none;
}

.news-ticker[data-ticker-paused="true"] .ticker-icon-play {
  display: block;
}

.news-ticker[data-ticker-running="true"] .news-ticker-window {
  overflow: hidden;
}

.news-ticker[data-ticker-running="true"] .ticker-track {
  animation: newstimes-ticker-scroll var(--ticker-duration, 36s) linear infinite;
}

.news-ticker[data-ticker-running="true"] .ticker-items--duplicate {
  display: flex;
}

.news-ticker:hover .ticker-track,
.news-ticker:focus-within .ticker-track,
.news-ticker[data-ticker-paused="true"] .ticker-track,
.news-ticker[data-ticker-page-hidden="true"] .ticker-track {
  animation-play-state: paused;
}

@keyframes newstimes-ticker-scroll {
  to {
    transform: translateX(-50%);
  }
}

.no-results {
  padding: 28px;
  background: var(--nt-soft);
  text-align: center;
}

.search-form {
  display: flex;
  max-width: 600px;
  margin: 0 0 28px;
  gap: 8px;
}

.search-form label {
  flex: 1;
}

.search-form input[type="search"] {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--nt-control);
  border-radius: 4px;
  background: var(--nt-paper);
  color: var(--nt-ink);
  font: inherit;
}

.search-form input[type="submit"] {
  min-height: 44px;
  padding: 8px 18px;
  border: 0;
  border-radius: 4px;
  background: var(--nt-accent);
  color: var(--nt-paper);
  font: inherit;
  cursor: pointer;
}

.search-panel .search-form {
  margin: 0;
}

@media (max-width: 1100px) {
  .home-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  }

  .home-layout--lead-wide .home-top {
    grid-template-areas:
      "lead"
      "latest";
    grid-template-columns: minmax(0, 1fr);
  }

  .home-layout--lead-wide .home-categories {
    display: none;
  }

  .home-latest {
    border-right: 0;
  }

  .home-categories {
    display: none;
  }

  .home-section-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  body {
    padding-bottom: 44px;
  }

  .article-content {
    text-align: start;
  }

  .site-header {
    height: 72px;
  }

  .masthead {
    height: 72px;
    padding: 0 12px;
  }

  .brand {
    top: 16px;
    left: 88px;
    width: 150px;
    height: 40px;
    transform: none;
  }

  .header-login {
    min-height: 40px;
    padding-inline: 10px;
    gap: 6px;
    font-size: 13px;
  }

  .header-login svg {
    width: 16px;
    height: 16px;
  }

  .masthead-side {
    gap: 8px;
  }

  .masthead-side--right {
    margin-left: auto;
  }

  .masthead-side:first-child {
    width: 44px;
  }

  .mobile-navigation {
    display: block;
  }

  .site-date,
  .primary-navigation {
    display: none;
  }

  .header-action {
    width: 40px;
    height: 40px;
  }

  .topic-rail {
    height: 59px;
  }

  .topic-rail-inner {
    height: 52px;
    padding-inline: 12px;
  }

  .content-wrap {
    width: min(calc(100% - 24px), var(--nt-content));
    padding: 20px 0 40px;
  }

  .home-top {
    display: block;
  }

  .home-latest {
    margin-top: 24px;
    padding: 0;
  }

  .story-card--lead .story-card-title {
    font-size: 23px;
  }

  .home-selected {
    margin-top: 24px;
  }

  .story-grid {
    gap: 14px 10px;
  }

  .story-card--grid .story-card-title {
    font-size: 15px;
  }

  .home-section-grid,
  .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 10px;
  }

  .archive-grid .story-card-title {
    font-size: 16px;
  }

  .article-layout {
    display: block;
  }

  .newstimes-ad-slot {
    width: min(calc(100% - 24px), var(--nt-content));
    margin-block: 18px;
  }

  .article-header {
    padding-inline: 4px;
  }

  .article-title {
    font-size: 28px;
  }

  .article-deck {
    font-size: 17px;
  }

  .article-sidebar {
    margin-top: 36px;
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .footer-brand-column {
    grid-column: 1 / -1;
  }

  .footer-institutional {
    padding-top: 0;
  }

  .site-footer {
    padding: 40px 16px 20px;
  }

  .footer-legal {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .ticker-label {
    padding-inline: 10px;
    font-size: 12px;
  }

  .ticker-items {
    gap: 18px;
    padding-inline-end: 18px;
  }

  .ticker-items a {
    font-size: 13px;
  }

  .ticker-toggle {
    width: 36px;
    height: 36px;
    margin-inline: 2px;
  }
}

@media (max-width: 430px) {
  .brand {
    left: 64px;
    width: clamp(100px, calc(100vw - 260px), 130px);
  }
}

@media (max-width: 390px) {
  .header-search {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .story-card-image img {
    transition: none;
  }

  .news-ticker-window {
    overflow-x: auto !important;
  }

  .ticker-track {
    animation: none !important;
  }

  .ticker-items--duplicate {
    display: none !important;
  }
}
