/* Header and navigation */
.masthead {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  border-bottom: 1px solid var(--line);
  padding: 0 26px;
}
.brand {
  display: inline-flex;
  gap: 5px;
  font: bold 26px Georgia;
  letter-spacing: -1px;
}
.brand span {
  display: inline-grid;
  place-items: center;
  background: #161616;
  color: white;
  width: 38px;
  height: 38px;
}
.masthead > .brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.header-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}
.icon-btn {
  background: none;
  border: 0;
  font-size: 24px;
  line-height: 1;
  padding: 8px;
}
.main-nav {
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  gap: 0;
  overflow: auto;
  white-space: nowrap;
}
.main-nav a {
  font-weight: 700;
  font-size: 14px;
  padding: 16px 15px;
  border-bottom: 3px solid transparent;
}
.main-nav a.active {
  border-color: #222;
}
.main-nav a:hover {
  background: #eee;
  text-decoration: none;
}
.drawer {
  padding: 24px;
  background: #f5f5f5;
  border-bottom: 1px solid #ccc;
}
.drawer nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.search-form {
  display: flex;
  gap: 10px;
  max-width: 650px;
}
.search-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid #888;
  padding: 12px;
}
.edition {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.7px;
  color: #666;
  margin: 23px 0;
}
.demo-pill {
  color: #777;
}
.top-grid {
  display: grid;
  grid-template-columns: 1fr 2.05fr 1fr;
  gap: 24px;
}
.story {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.story img {
  aspect-ratio: 1.77;
  margin-bottom: 12px;
}
.story h3 {
  margin: 0 0 10px;
}
.story p {
  font-size: 14px;
  margin: 0;
}
.lead h3 {
  font-size: 35px;
}
.lead p {
  font-size: 16px;
}
.side-list .story h3 {
  font-size: 21px;
}
.live-tag {
  font: bold 13px Arial;
  color: var(--red);
}
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.feature-grid h3 {
  font-size: 28px;
}
.dark-band {
  background: #171717;
  color: #fff;
  margin: 32px -24px;
  padding: 26px 24px;
}
.dark-band .rule-title {
  border-color: #fff;
  margin-top: 0;
}
.dark-band .story {
  border: 0;
  margin: 0;
}
.dark-band .meta {
  color: #aaa;
}
.promo {
  background: #f2f2f2;
  padding: 35px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.section-title {
  font-size: 48px;
  margin: 28px 0 14px;
}
.subnav {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 16px;
  margin-bottom: 26px;
  font-size: 14px;
}
.article {
  max-width: 820px;
  margin: 40px auto;
}
.article h1 {
  font-size: 48px;
}
.article .standfirst {
  font-size: 21px;
  color: #555;
}
.article-tools {
  display: flex;
  gap: 12px;
  margin: 24px 0;
}
.article figure {
  margin: 28px 0;
}
.article figcaption {
  font-size: 12px;
  color: #666;
  margin-top: 8px;
}
.article-copy {
  max-width: 680px;
  margin: auto;
  font: 19px/1.7 Georgia;
}
.article-copy p {
  line-height: 1.75;
  margin: 26px 0;
}
.article-copy h2 {
  margin-top: 32px;
}
.article video {
  width: 100%;
  background: #111;
}
.result {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 25px;
  padding: 24px 0;
  border-bottom: 1px solid #ccc;
}
.result img {
  aspect-ratio: 1.77;
}
.result h2 {
  font-size: 26px;
}
.page-intro {
  max-width: 800px;
  margin: 40px 0;
}
.timeline {
  border-left: 2px solid #b80000;
  margin: 30px 0;
  padding-left: 30px;
  max-width: 850px;
}
.timeline section {
  margin: 0 0 35px;
}
.timeline time {
  font-size: 13px;
  color: #b80000;
}
.status {
  padding: 12px 0;
  font-size: 14px;
}
footer {
  border-top: 1px solid #ccc;
  margin-top: 55px;
  padding: 32px 0;
}
footer nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-weight: bold;
  font-size: 14px;
  margin: 28px 0;
}
footer .legal {
  border-top: 1px solid #ccc;
  padding-top: 22px;
  font-size: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
footer p {
  font-size: 12px;
  color: #666;
  margin-top: 22px;
}
.empty {
  padding: 70px 0;
  color: #555;
}
.numbered {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 8px;
}
.numbered b {
  font: 34px Georgia;
  color: #999;
}
/* Editorial modules mapped from the supplied homepage structure */
.editorial-section {
  margin: 38px 0 0;
  border-top: 2px solid #222;
  padding-top: 14px;
}
.section-heading {
  font:
    700 19px/1.2 Arial,
    sans-serif;
  margin: 0 0 22px;
  text-transform: uppercase;
}
.section-heading span {
  font-size: 27px;
  line-height: 12px;
  vertical-align: -2px;
  margin-left: 6px;
}
.editorial-section > .row .story {
  height: 100%;
  margin: 0;
}
.editorial-section .story h3 {
  font-size: 23px;
}
.editorial-section .col-md-3 .story h3 {
  font-size: 20px;
}
.editorial-dark {
  background: #151515;
  color: white;
  border: 0;
  margin: 38px -24px 0;
  padding: 24px;
}
.editorial-dark .section-heading {
  border-top: 2px solid white;
  padding-top: 16px;
}
.editorial-dark .meta {
  color: #bbb;
}
.rail-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -10px 0 16px;
  font-size: 12px;
  color: #777;
}
.rail-toolbar button {
  border: 1px solid #ccc;
  background: transparent;
  color: inherit;
  font: 28px/1 Arial;
  width: 34px;
  height: 34px;
  margin-left: 8px;
}
.editorial-dark .rail-toolbar {
  color: #ddd;
}
.editorial-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 48px) / 4);
  gap: 16px;
  overflow: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding-bottom: 18px;
}
.rail-card {
  scroll-snap-align: start;
}
.rail-card h3 {
  font-size: 22px;
  margin: 9px 0;
}
.rail-card p {
  font-size: 14px;
}
.rail-image {
  position: relative;
}
.rail-image img {
  aspect-ratio: 1.55;
}
.media-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 8px 10px;
  background: #111;
  color: white;
  font-size: 11px;
  font-weight: bold;
}
.spotlight img {
  aspect-ratio: 1.77;
}
.spotlight h3 {
  font-size: 30px;
}
.spotlight p {
  font-size: 16px;
}
.topic-columns {
  border-top: 0;
  padding-top: 0;
}
.topic-columns .section-heading {
  border-top: 2px solid #222;
  padding-top: 15px;
  font-size: 17px;
  min-height: 44px;
  margin-bottom: 13px;
}
.topic-story {
  border-bottom: 1px solid #ccc;
  margin-bottom: 15px;
  padding-bottom: 16px;
}
.topic-story img {
  aspect-ratio: 1.77;
  margin-bottom: 12px;
}
.topic-story h3 {
  font-size: 19px;
  margin: 0;
}
.topic-story:first-of-type h3 {
  font-size: 23px;
}
.topic-story .meta {
  font-size: 11px;
  margin-top: 13px;
}
.watch-feature .col-md-8 > a {
  display: block;
  position: relative;
}
.watch-feature img {
  aspect-ratio: 1.8;
}
.play-circle {
  position: absolute;
  bottom: 15px;
  left: 15px;
  background: white;
  color: #111;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  font-size: 25px;
}
.watch-feature h2 {
  font-size: 32px;
  margin-top: 16px;
}
.discover-banner {
  background: #e9e9e9;
  padding: 42px;
  position: relative;
  overflow: hidden;
}
.discover-banner:after {
  content: "SAARC";
  font: bold 190px Georgia;
  position: absolute;
  right: 35px;
  top: 0;
  opacity: 0.07;
  pointer-events: none;
}
.discover-banner h2 {
  font-size: 39px;
  margin: 14px 0;
}
.discovery-card {
  min-width: 0;
  height: 100%;
  overflow-wrap: anywhere;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  min-height: 200px;
  background: #e8e4dc;
}
.discovery-card h3 {
  font-size: 24px;
  margin: 18px 0;
}
.discovery-card:hover {
  text-decoration: none;
  outline: 2px solid #222;
}
.discovery-1 {
  background: #dde6e7;
}
.discovery-2 {
  background: #e9dfdc;
}
.discovery-3 {
  background: #e0e3d7;
}
.discovery-arrow {
  margin-top: auto;
  font-size: 13px;
  font-weight: bold;
}
.related-inline {
  display: flex;
  gap: 24px;
  border-top: 1px solid #ccc;
  padding-top: 15px;
  font-weight: bold;
  font-size: 14px;
}
.section-page-header h1 {
  font-size: 54px;
  margin: 28px 0 10px;
}
.section-page-header > p {
  font-size: 14px;
  color: #666;
}
.horizontal-story .story {
  display: flow-root;
}
.horizontal-story .story img {
  width: 42%;
  float: left;
  margin: 0 18px 15px 0;
}
.horizontal-story .story h3 {
  font-size: 23px;
}
.horizontal-story .story p {
  font-size: 13px;
}
.numbered h3 {
  font-size: 21px;
}
.footer-explore {
  font-size: 13px;
  margin-top: 25px;
}
.footer-explore summary {
  font-weight: bold;
  padding: 12px;
  background: #eee;
  display: inline-list-item;
  cursor: pointer;
}
.ad-space {
  height: 150px;
  background: #f6f6f6;
  display: grid;
  place-items: center;
  color: #999;
  font-size: 10px;
  letter-spacing: 2px;
}
.article-copy .muted {
  border-top: 1px solid #ccc;
  padding-top: 20px;
}
/* Left-side navigation and search panel */
body.drawer-open {
  overflow: hidden;
}
dialog.drawer {
  position: fixed;
  inset: 0 auto 0 0;
  margin: 0;
  width: 360px;
  max-width: 90vw;
  height: 100dvh;
  max-height: 100dvh;
  padding: 0 24px 28px;
  border: 0;
  border-right: 1px solid #ddd;
  background: #fff;
  color: #181818;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 8px 0 30px #0002;
}
dialog.drawer::backdrop {
  background: rgb(0 0 0 / 45%);
}
dialog.drawer[open] {
  animation: drawer-enter 0.2s ease-out;
}
.drawer-top {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid #ddd;
  margin-bottom: 16px;
}
.drawer-top strong {
  font-size: 17px;
}
.drawer-top button {
  font-size: 30px;
}
dialog.drawer nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}
dialog.drawer nav a {
  display: block;
  padding: 13px 8px;
  border-bottom: 1px solid #e5e5e5;
  font-size: 17px;
  font-weight: 700;
}
dialog.drawer nav a:hover {
  background: #f2f2f2;
  text-decoration: none;
}
dialog.drawer .search-form {
  flex-wrap: wrap;
  gap: 10px;
}
dialog.drawer .search-form input {
  width: 100%;
  flex: 1 1 100%;
}
@keyframes drawer-enter {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}
/* Manual horizontal scrolling only: no arrows, automatic motion or visible scrollbar. */
.editorial-rail {
  scroll-snap-type: none;
  scroll-behavior: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.editorial-rail::-webkit-scrollbar,
.main-nav::-webkit-scrollbar,
.subnav::-webkit-scrollbar {
  display: none;
}
.main-nav,
.subnav {
  scrollbar-width: none;
}
a,
a:hover,
a:focus,
a:active {
  text-decoration: none !important;
}

/* Keep horizontal rows within the viewport and enable hand dragging on desktop. */
.editorial-rail {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  touch-action: auto;
  -webkit-overflow-scrolling: touch;
}
.rail-card {
  min-width: 0;
}

.editorial-rail.is-dragging,
.main-nav.is-dragging,
.subnav.is-dragging {
  cursor: grabbing;
  user-select: none;
}
.editorial-rail img,
.main-nav img,
.subnav img {
  -webkit-user-drag: none;
}
/* News landing page: distinct lead grid, headline strip and ranking sections. */
.news-page-heading h1 {
  font:
    bold 54px/1 Arial,
    sans-serif;
  letter-spacing: -2px;
  margin: 30px 0 24px;
}
.category-page-heading h1 {
  font:
    700 48px/1.1 Georgia,
    serif;
  margin: 32px 0 22px;
}
.reference-news-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}
.reference-news-grid .story {
  margin-bottom: 18px;
  padding-bottom: 18px;
}
.reference-lead .story h3 {
  font-size: 34px;
}
.reference-lead .story p {
  font-size: 16px;
}
.reference-secondary .story h3 {
  font-size: 21px;
}
.reference-briefs .story h3 {
  font-size: 20px;
}
.reference-briefs .story p {
  display: none;
}
.headline-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  padding: 20px 0;
  margin-top: 12px;
}
.headline-strip h3 {
  font-size: 20px;
  margin: 0;
}
.headline-strip > a {
  border-right: 1px solid #ccc;
  padding-right: 15px;
}
.headline-strip > a:last-child {
  border: 0;
}
.rank-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 36px;
}
.rank-grid article {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
}
.rank-grid article > span {
  font: 38px/1 Georgia;
  color: #777;
}
.rank-grid h3 {
  font: 700 19px/1.3 Georgia;
  margin: 0;
}
.reference-ranking {
  padding-bottom: 12px;
}
.video-cover {
  display: block;
  position: relative;
}
.video-cover > img {
  aspect-ratio: 1.77;
}
.video-explore {
  border-left: 1px solid #ccc;
}
.video-explore > h3 {
  font: bold 18px Arial;
  margin-bottom: 20px;
}
.video-explore > a {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid #ccc;
}
.video-explore img {
  width: 110px;
  height: 70px;
}
.video-explore h4 {
  font: 700 17px/1.25 Georgia;
}
.latest-items {
  max-width: 1000px;
}
/* Single article: compact metadata, narrow reading column and editorial recommendations. */
.reference-article {
  max-width: 800px;
  margin: 40px auto 30px;
}
.article-heading {
  max-width: 700px;
  margin: 0 auto;
}
.article-heading h1 {
  font-size: 44px;
  line-height: 1.12;
  margin-bottom: 22px;
}
.article-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ddd;
  padding-bottom: 15px;
  font-size: 13px;
}
.article-topline .article-tools {
  margin: 0;
  gap: 10px;
}
.article-tools .btn-link {
  color: #222;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
}
.article-byline {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 20px 0;
  font-size: 14px;
}
.article-byline span {
  font-size: 12px;
  color: #666;
}
.reference-article .article-copy {
  max-width: 650px;
  font:
    17px/1.7 Arial,
    sans-serif;
}
.reference-article .article-copy p {
  line-height: 1.65;
  margin: 24px 0;
}
.article-intro {
  font-weight: 700;
  font-size: 19px;
}
.inline-related {
  margin: 30px 0;
  padding: 16px 0;
  border-top: 1px solid #aaa;
  border-bottom: 1px solid #aaa;
  display: flex;
  flex-direction: column;
  gap: 17px;
}
.inline-related a {
  font-weight: bold;
  font-size: 18px;
  line-height: 1.4;
}
.inline-media > a {
  display: block;
  position: relative;
}
.inline-play {
  position: absolute;
  bottom: 0;
  left: 0;
  background: #111;
  color: #fff;
  padding: 12px 18px;
  font: bold 14px Arial;
}
.article-tags {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}
.article-tags a {
  background: #eee;
  padding: 9px 13px;
  font-size: 13px;
}
.article-note {
  font-size: 13px;
  color: #666;
}
.article-related,
.article-more {
  max-width: 1000px;
  margin: 40px auto;
  border-top: 2px solid #222;
  padding-top: 18px;
}
.article-related h3 {
  font-size: 22px;
}
.more-story {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 230px;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid #ccc;
}
.more-date {
  font-size: 12px;
  line-height: 1.5;
  color: #666;
}
.more-story h3 {
  font-size: 24px;
  margin-bottom: 10px;
}
.more-story p {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 10px;
}
.more-story img {
  aspect-ratio: 1.77;
}
.more-story .meta {
  margin: 0;
}
/* Register/login navigation and account pages */
.masthead .account-actions {
  gap: 20px;
}
.account-actions .login-link {
  font-size: 14px;
  font-weight: 700;
}
.masthead .account-actions .profile-link {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: #111;
}
.account-page {
  max-width: 460px;
  margin: 40px auto 64px;
}
.account-back {
  font-size: 13px;
  color: #555;
  display: inline-block;
  margin-bottom: 30px;
}
.account-card {
  border-top: 3px solid #111;
  padding-top: 28px;
}
.account-card h1 {
  font-size: 37px;
  margin: 14px 0;
}
.account-intro {
  color: #666;
  font-size: 15px;
}
.account-tabs {
  display: flex;
  border-bottom: 1px solid #ccc;
  margin: 28px 0 20px;
}
.account-tabs a {
  flex: 1;
  text-align: center;
  padding: 13px;
  font-weight: 700;
  font-size: 15px;
  border-bottom: 3px solid transparent;
}
.account-tabs a[aria-current] {
  border-bottom-color: #111;
}
.account-preview {
  background: #f4f4f4;
  padding: 12px 14px;
  font-size: 12px;
  color: #555;
}
.account-card form > label {
  display: block;
  margin: 22px 0 8px;
  font-size: 14px;
  font-weight: 700;
}
.account-card .form-control {
  border: 1px solid #888;
  border-radius: 0;
  min-height: 49px;
  font-size: 16px;
  padding: 12px;
}
.password-field {
  position: relative;
}
.password-field input {
  padding-right: 70px !important;
}
.password-field button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  padding: 7px;
}
.password-help {
  font-size: 12px;
  color: #666;
  margin: 8px 0 0;
}
.account-card form > .account-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
  line-height: 1.5;
}
.account-consent input {
  margin-top: 4px;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  accent-color: #111;
}
.account-consent a,
.account-switch a {
  font-weight: 700;
}
.account-submit {
  width: 100%;
  padding: 13px;
  margin-top: 24px;
  font-weight: 700;
}
.account-switch {
  border-top: 1px solid #ddd;
  padding-top: 23px;
  margin-top: 24px;
  font-size: 14px;
  text-align: center;
}
#account-status:empty {
  display: none;
}
#account-status {
  margin: 18px 0 0;
  padding: 12px;
  background: #f3f3f3;
  font-size: 14px;
}

/* SAARC Express masthead: large SAARC, smaller EXPRESS beneath. */
.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1;
  letter-spacing: 0;
}
.brand .brand-main {
  display: block;
  width: auto;
  height: auto;
  background: transparent;
  color: #161616;
  font:
    900 34px/0.95 Georgia,
    "Times New Roman",
    serif;
  letter-spacing: 1px;
}
.brand .brand-sub {
  display: block;
  width: auto;
  height: auto;
  background: transparent;
  color: #161616;
  font:
    700 10px/1.2 Arial,
    Helvetica,
    sans-serif;
  letter-spacing: 5.6px;
  padding-left: 5.6px;
}

/* Story-row arrows remain visible on desktop and mobile. */
.rail-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.rail-toolbar .rail-controls button {
  display: grid;
  place-items: center;
  margin: 0;
  width: 40px;
  height: 40px;
  padding: 9px;
  border: 1px solid #222;
  background: #fff;
  color: #111;
  cursor: pointer;
}
.rail-controls svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rail-toolbar .rail-controls button:hover:not(:disabled) {
  background: #111;
  color: #fff;
}
.rail-toolbar .rail-controls button:disabled {
  opacity: 0.3;
  cursor: default;
}
.editorial-dark .rail-toolbar .rail-controls button {
  border-color: #aaa;
  background: transparent;
  color: #fff;
}
.editorial-dark .rail-toolbar .rail-controls button:hover:not(:disabled) {
  background: #fff;
  color: #111;
}

/* SAARC square-letter wordmark, adapted from the supplied reference. */
.brand {
  gap: 4px;
}
.brand .brand-main {
  display: flex;
  gap: 5px;
  letter-spacing: 0;
}
.brand .brand-main .brand-letter {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  background: #123a62;
  color: #fff;
  font:
    800 25px/1 Arial,
    Helvetica,
    sans-serif;
  letter-spacing: 0;
}
.brand .brand-sub {
  color: #123a62;
  font-size: 9px;
  letter-spacing: 7px;
  padding-left: 7px;
  line-height: 1.1;
}

/* Keep the logo bar visible while category navigation scrolls with the page. */
:root {
  --masthead-height: 76px;
}
html {
  scroll-padding-top: calc(var(--masthead-height) + 16px);
}
#header {
  padding-top: var(--masthead-height);
}
#header .masthead {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--masthead-height);
  z-index: 1030;
  background: #fff;
}
#header .main-nav {
  position: relative;
  z-index: 1;
  background: #fff;
}

/* Center category titles and section links with a more compact heading. */
.category-page-heading {
  text-align: center;
}
.category-page-heading h1 {
  font-size: 36px;
  line-height: 1.15;
  margin: 26px 0 18px;
}
.category-page-heading .subnav {
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  white-space: normal;
  overflow: visible;
  text-align: center;
}

/* Backend template forms and single-media players. */
.contact-form {
  max-width: 620px;
}
.contact-form label {
  display: block;
  margin: 20px 0 8px;
  font-weight: 700;
  font-size: 14px;
}
.contact-form .form-control {
  border-radius: 0;
  padding: 12px;
  border-color: #999;
}
.media-detail video,
.media-detail audio {
  width: 100%;
}
.media-detail audio {
  margin-top: 20px;
}
.media-transcript {
  border-top: 1px solid #ccc;
  padding: 20px 0;
}
.media-transcript summary {
  font-weight: 700;
  cursor: pointer;
}

/* Sidebar categories: separate navigation links and accessible expand controls. */
.drawer-category-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #e5e5e5;
}
dialog.drawer .drawer-category-row > a {
  flex: 1;
  min-width: 0;
  border-bottom: 0;
}
.subcategory-toggle {
  width: 48px;
  min-height: 48px;
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 22px;
}
.subcategory-toggle:hover {
  background: #f2f2f2;
}
.subcategory-toggle span {
  display: inline-block;
}
.subcategory-toggle[aria-expanded="true"] span {
  transform: rotate(180deg);
}
.drawer-subcategories {
  padding: 4px 0 8px 16px;
  background: #f6f6f6;
}
dialog.drawer .drawer-subcategories a {
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
/* Category archive and numbered pagination. */
#latest-category .latest-items {
  max-width: none;
}
#latest-category .more-story {
  grid-template-columns: 100px minmax(0, 1fr) 32%;
  gap: 24px;
  padding: 28px 0;
}
.more-date {
  white-space: normal;
}
.story-pagination {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 32px 0 12px;
}
.story-pagination button {
  border: 1px solid #bbb;
  background: white;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 13px;
}
.story-pagination button[aria-current] {
  background: #132d48;
  color: white;
  border-color: #132d48;
}
.story-pagination button:disabled {
  opacity: 0.4;
  cursor: default;
}
.page-count {
  text-align: center;
  color: #666;
  font-size: 0.875rem;
}
/* Reference-inspired account flow, with SAARC branding. */
body.auth-page {
  background: #000;
  color: #fff;
  padding-top: 0;
}
.auth-page #header {
  display: none;
}
.auth-main {
  max-width: 640px;
  min-height: 75vh;
  margin: 0 auto;
  padding: 60px 24px 40px;
}
.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto 24px;
  width: fit-content;
}
.auth-brand > span {
  display: flex;
  gap: 6px;
}
.auth-brand b {
  background: white;
  color: #132d48;
  display: grid;
  place-items: center;
  width: 38px;
  height: 42px;
  font-size: 30px;
}
.auth-brand small {
  letter-spacing: 7px;
  padding-left: 7px;
  margin-top: 8px;
  font-size: 10px;
}
.auth-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: #fff;
  color: #000;
  width: 36px;
  height: 36px;
  text-align: center;
  font-size: 30px;
  line-height: 1;
}
.auth-back {
  position: absolute;
  top: 16px;
  left: 20px;
  color: white;
  background: none;
  border: none;
  min-height: 44px;
}
.auth-main h1 {
  font-family: Arial, sans-serif;
  font-size: clamp(1.6rem, 1.2rem + 1vw, 2.2rem);
  text-align: center;
  margin: 30px 0 42px;
}
.auth-main h2 {
  font-family: Arial, sans-serif;
  font-size: 1.4rem;
  margin-top: 35px;
}
.auth-preview {
  color: #aaa;
  font-size: 0.75rem;
  text-align: center;
}
.auth-main form {
  margin: 32px 0;
}
.auth-main label {
  display: block;
  margin-bottom: 8px;
}
.auth-main input {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #ddd;
  background: transparent;
  color: white;
  padding: 10px 0;
  border-radius: 0;
  font-size: 1.2rem;
}
.auth-main input:focus {
  outline-offset: 5px;
}
.auth-primary,
.auth-secondary {
  display: block;
  width: 100%;
  padding: 16px;
  margin: 28px 0;
  font-weight: 700;
  text-align: center;
  font-size: 1rem;
}
.auth-primary {
  background: #0674ed;
  border: 1px solid #0674ed;
  color: white;
}
.auth-secondary {
  background: none;
  color: white;
  border: 2px solid white;
}
.auth-main p,
.auth-main a {
  overflow-wrap: anywhere;
}
.auth-main a:not(.auth-primary):not(.auth-brand):not(.auth-close),
[data-edit-email] {
  color: #45a3ff;
}
[data-edit-email] {
  background: none;
  border: 0;
  font-weight: bold;
  padding: 5px;
}
.auth-main #password-toggle {
  display: block;
  margin: 8px 0 0 auto;
  background: none;
  border: 0;
  color: white;
  font-size: 0.85rem;
}
.auth-page footer {
  border-color: #555;
}
.auth-page footer .brand,
.auth-page footer nav,
.auth-page .footer-explore {
  display: none;
}
.auth-page footer p {
  color: #bbb;
}
/* Account settings and saved content share one reusable template. */
.account-hub {
  padding-top: 30px;
}
.hub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid #ccc;
}
.settings-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  background: #f4f4f4;
  margin: 24px 0;
}
.settings-nav {
  display: flex;
  flex-direction: column;
}
.settings-nav a {
  padding: 24px;
  border-bottom: 1px solid #ccc;
  color: #006be6;
  font-weight: bold;
}
.settings-content {
  background: #fff;
  padding: 32px;
}
.settings-content h2 {
  font-family: Arial, sans-serif;
  margin: 26px 0;
}
.settings-content label {
  display: block;
  margin: 20px 0;
  max-width: 500px;
}
.saved-empty {
  padding: 45px 24px;
  background: #f5f5f5;
  text-align: center;
}
#saved {
  padding: 30px 0;
}
.account-menu {
  position: relative;
}
.account-menu summary {
  cursor: pointer;
  list-style: none;
  font-weight: bold;
  padding: 10px;
}
.account-menu > nav {
  position: absolute;
  right: 0;
  top: 100%;
  background: #111;
  color: white;
  min-width: 180px;
  z-index: 20;
}
.account-menu > nav a {
  display: block;
  padding: 15px 20px;
  border-bottom: 1px solid #333;
}

/* Half-width story cards share the same layout in archives and related lists. */
.story-grid .more-story,
#latest-category .story-grid .more-story {
  grid-template-columns: minmax(0, 1fr) minmax(90px, 30%);
  align-content: start;
  gap: 10px 16px;
  padding: 20px 0;
  height: 100%;
}
.story-grid .more-date {
  grid-column: 1 / -1;
  grid-row: 1;
}
.story-grid .more-story > div {
  grid-column: 1;
  grid-row: 2;
}
.story-grid .more-story > a:last-child {
  grid-column: 2;
  grid-row: 2;
}
.story-grid .more-story img {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
}
.story-grid .more-story h3 {
  font-size: clamp(1.125rem, 1rem + 0.3vw, 1.375rem);
  line-height: 1.3;
}
.story-grid .more-story p {
  font-size: 0.875rem;
  line-height: 1.5;
}
.story-pagination button {
  flex-shrink: 0;
  white-space: nowrap;
}
