/* Final story-page polish: compact typography, reader tools, and RTL layout. */
main {
  padding: 22px 0 56px !important;
  background: #fff !important;
}

.story-shell {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.story-head.story-head-feature {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 420px !important;
  grid-template-areas: "copy map" !important;
  gap: clamp(34px, 4vw, 52px) !important;
  align-items: start !important;
  padding: 4px 34px 30px !important;
  direction: ltr !important;
}

.story-head-copy {
  grid-area: copy;
  min-width: 0;
  max-width: 850px !important;
  direction: ltr !important;
  text-align: left !important;
}

html[dir="rtl"] .story-head.story-head-feature {
  grid-template-columns: 420px minmax(0, 1fr) !important;
  grid-template-areas: "map copy" !important;
}

html[dir="rtl"] .story-head-copy {
  direction: rtl !important;
  text-align: right !important;
}

.story-back-top {
  margin: 0 0 16px !important;
}

.story-back-top a {
  min-height: 32px !important;
  padding: 0 !important;
  border-radius: 0 !important;
  color: #071126 !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

.story-back-top a::before {
  content: "\2190";
  display: inline-block;
  margin-inline-end: 9px;
  font-size: 20px;
  line-height: 1;
  vertical-align: -1px;
}

html[dir="rtl"] .story-back-top a::before {
  content: "\2192";
}

.story-kicker {
  display: none !important;
}

.story-title {
  max-width: 790px !important;
  margin: 0 !important;
  color: #071126 !important;
  font-size: clamp(34px, 4vw, 54px) !important;
  line-height: 1.09 !important;
  letter-spacing: -.018em !important;
  font-weight: 900 !important;
  text-wrap: balance !important;
}

html[dir="rtl"] .story-title {
  font-size: clamp(33px, 3.7vw, 50px) !important;
  line-height: 1.22 !important;
  letter-spacing: 0 !important;
}

.story-summary {
  max-width: 820px !important;
  margin: 16px 0 0 !important;
  color: #324767 !important;
  font-size: clamp(17px, 1.5vw, 20px) !important;
  line-height: 1.65 !important;
  font-weight: 450 !important;
}

html[dir="rtl"] .story-summary {
  line-height: 1.9 !important;
}

.story-meta {
  margin-top: 22px !important;
  gap: 18px !important;
  color: #263a5c !important;
  font-size: 16px !important;
}

.story-map-card {
  grid-area: map;
  justify-self: end !important;
  width: 420px !important;
  height: 228px !important;
  min-height: 228px !important;
  margin-top: 4px !important;
  background: url("../assets/images/maps/world-map-soft.svg") center / contain no-repeat !important;
  opacity: 1 !important;
}

html[dir="rtl"] .story-map-card {
  justify-self: start !important;
}

.story-map-card::before {
  display: block !important;
  content: "" !important;
  position: absolute !important;
  left: -112px !important;
  right: auto !important;
  top: 76px !important;
  width: 145px !important;
  height: 84px !important;
  background-image: radial-gradient(rgba(11, 31, 58, .34) 1.45px, transparent 1.45px) !important;
  background-size: 18px 18px !important;
  opacity: .34 !important;
}

html[dir="rtl"] .story-map-card::before {
  left: auto !important;
  right: -112px !important;
}

.story-map-card::after {
  content: "" !important;
  position: absolute !important;
  right: 57px !important;
  top: 73px !important;
  width: 128px !important;
  height: 87px !important;
  background: url("../assets/images/maps/afghanistan-map.svg") center / contain no-repeat !important;
  filter: brightness(0) saturate(100%) invert(10%) sepia(38%) saturate(1556%) hue-rotate(180deg) brightness(88%) contrast(102%) !important;
  z-index: 2 !important;
}

.story-map-img,
.story-map-card strong,
.story-map-dot {
  display: none !important;
}

.story-map-pin {
  right: 98px !important;
  top: 82px !important;
  width: 30px !important;
  height: 30px !important;
  background: #f4aa2f !important;
  border-radius: 50% 50% 50% 0 !important;
  transform: rotate(-45deg) !important;
  box-shadow: 0 10px 24px rgba(244, 170, 47, .42) !important;
  z-index: 3 !important;
}

.story-map-pin::after {
  left: 8px !important;
  top: 8px !important;
  width: 14px !important;
  height: 14px !important;
  background: #0b1f3a !important;
}

.story-reader-tools {
  margin: 0 28px 20px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border: 1px solid #dbe4ef;
  border-radius: 18px;
  background: #f7f9fc;
  box-shadow: 0 10px 24px rgba(11, 31, 58, .06);
}

.story-reader-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.story-tool-button {
  min-height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #d6e0ec;
  border-radius: 12px;
  background: #fff;
  color: #18304f;
  font: inherit;
  font-size: 14px;
  font-weight: 780;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.story-tool-button:hover {
  border-color: #9eb0c5;
  color: #071126;
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(11, 31, 58, .09);
}

.story-tool-button:focus-visible,
.story-text-size-button:focus-visible {
  outline: 3px solid rgba(212, 166, 74, .36);
  outline-offset: 2px;
}

.story-tool-primary {
  border-color: #0b1f3a;
  background: #0b1f3a;
  color: #fff;
}

.story-tool-primary:hover {
  border-color: #183e69;
  background: #183e69;
  color: #fff;
}

.story-tool-button.saved {
  border-color: #c79a39;
  background: #fff8e8;
  color: #755415;
}

.story-tool-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.story-text-size {
  margin-inline-start: auto;
  min-height: 42px;
  padding: 4px 5px 4px 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #d6e0ec;
  border-radius: 12px;
  background: #fff;
}

html[dir="rtl"] .story-text-size {
  padding: 4px 12px 4px 5px;
}

.story-text-size-label {
  color: #51647d;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.story-text-size-options {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  direction: ltr;
}

.story-text-size-button {
  width: 34px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #314761;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.story-text-size-button:hover {
  background: #edf2f8;
}

.story-text-size-button.active,
.story-text-size-button[aria-pressed="true"] {
  background: #d4a64a;
  color: #071126;
}

.story-share-status {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.story-share-toast {
  position: fixed !important;
  left: 50% !important;
  bottom: 24px !important;
  transform: translateX(-50%) translateY(8px) !important;
  z-index: 1300 !important;
  max-width: calc(100% - 32px) !important;
  padding: 10px 16px !important;
  border-radius: 12px !important;
  background: #071126 !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-align: center !important;
  white-space: normal !important;
  pointer-events: none !important;
  opacity: 0 !important;
  box-shadow: 0 14px 34px rgba(7, 17, 38, .28) !important;
  transition: opacity .2s ease, transform .2s ease !important;
}

.story-share-toast:not(:empty) {
  opacity: 1 !important;
  transform: translateX(-50%) translateY(0) !important;
}

.story-media {
  margin: 0 28px 32px !important;
  border: 1px solid rgba(11, 31, 58, .08) !important;
  border-radius: 22px !important;
  box-shadow: 0 20px 44px rgba(7, 17, 38, .15) !important;
  overflow: hidden !important;
}

.story-media::after {
  display: none !important;
}

.story-media img {
  height: clamp(360px, 40vw, 510px) !important;
  max-height: none !important;
  object-fit: cover !important;
}

.story-media-badge,
.story-read-badge,
.story-save-badge,
.story-share-overlay {
  display: none !important;
}

#story-main[data-story-text-size="small"] {
  --story-reading-size: 16px;
}

#story-main[data-story-text-size="medium"] {
  --story-reading-size: 18px;
}

#story-main[data-story-text-size="large"] {
  --story-reading-size: 20px;
}

.story-body {
  width: min(100%, 900px) !important;
  max-width: 900px !important;
  margin: 0 auto !important;
  padding: 8px 34px 36px !important;
  font-size: var(--story-reading-size, 18px) !important;
  transition: font-size .18s ease;
}

.story-body:focus {
  outline: none;
}

.story-body h2 {
  font-size: 1.55em !important;
}

.story-body h3,
.story-body h4 {
  font-size: 1.28em !important;
}

@media (max-width: 900px) {
  .story-head.story-head-feature,
  html[dir="rtl"] .story-head.story-head-feature {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas: "copy" !important;
    gap: 20px !important;
    padding: 4px 18px 24px !important;
  }

  .story-map-card {
    display: none !important;
  }

  .story-title,
  html[dir="rtl"] .story-title {
    font-size: clamp(29px, 7.8vw, 40px) !important;
    line-height: 1.18 !important;
  }

  .story-summary {
    font-size: 17px !important;
  }

  .story-reader-tools {
    margin: 0 10px 18px;
  }

  .story-reader-actions {
    flex: 1 1 auto;
  }

  .story-media {
    margin: 0 10px 24px !important;
    border-radius: 18px !important;
  }

  .story-media img {
    height: 350px !important;
  }

  .story-body {
    padding: 4px 18px 28px !important;
  }
}

@media (max-width: 620px) {
  main {
    padding-top: 14px !important;
  }

  .story-head.story-head-feature,
  html[dir="rtl"] .story-head.story-head-feature {
    padding-inline: 10px !important;
  }

  .story-title,
  html[dir="rtl"] .story-title {
    font-size: clamp(28px, 8.6vw, 36px) !important;
  }

  .story-summary {
    margin-top: 12px !important;
    font-size: 16px !important;
  }

  .story-meta {
    margin-top: 18px !important;
    gap: 12px !important;
    font-size: 14px !important;
  }

  .story-reader-tools {
    padding: 8px;
    gap: 8px;
    border-radius: 15px;
  }

  .story-reader-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(44px, 1fr));
    gap: 6px;
  }

  .story-tool-button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 0;
    border-radius: 10px;
  }

  .story-tool-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .story-tool-icon {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
  }

  .story-text-size {
    width: 100%;
    margin-inline-start: 0;
    justify-content: space-between;
  }

  .story-media img {
    height: 300px !important;
  }

  .story-body {
    padding-inline: 12px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-tool-button,
  .story-body,
  .story-share-toast {
    transition: none !important;
  }
}

.news-skip-link {
  position: fixed;
  inset-block-start: 10px;
  inset-inline-start: 16px;
  z-index: 1600;
  padding: 10px 16px;
  border-radius: 999px;
  background: #0b1f3a;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .18s ease;
}

.news-skip-link:focus {
  transform: translateY(0);
}

.story-back a:focus-visible,
.story-back-top a:focus-visible,
.story-related-card:focus-visible {
  outline: 3px solid rgba(212, 166, 74, .58);
  outline-offset: 3px;
}

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

  .news-skip-link {
    transition: none;
  }
}
