/* ==========================================================================
   SportNews, fast, accessible, SEO-first stylesheet
   No frameworks, no external fonts, no external requests.
   ========================================================================== */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #edeff3;
  --text: #10141f;
  --muted: #5c6473;
  --border: #e2e5eb;
  --accent: #e11d2e;
  --accent-hover: #c11424;
  --accent-contrast: #ffffff;
  --chip-bg: #10141f;
  --chip-text: #ffffff;
  --shadow: 0 1px 2px rgba(16, 20, 31, 0.05), 0 10px 30px rgba(16, 20, 31, 0.07);
  --shadow-lift: 0 2px 4px rgba(16, 20, 31, 0.06), 0 18px 44px rgba(16, 20, 31, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1120px;
  --header-bg: rgba(245, 246, 248, 0.85);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f17;
    --surface: #121826;
    --surface-2: #1a2234;
    --text: #e8ebf1;
    --muted: #99a1b3;
    --border: #232c40;
    --accent: #f43f4f;
    --accent-hover: #ff5d6c;
    --chip-bg: #e8ebf1;
    --chip-text: #0b0f17;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.45), 0 18px 44px rgba(0, 0, 0, 0.5);
    --header-bg: rgba(11, 15, 23, 0.85);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b0f17;
  --surface: #121826;
  --surface-2: #1a2234;
  --text: #e8ebf1;
  --muted: #99a1b3;
  --border: #232c40;
  --accent: #f43f4f;
  --accent-hover: #ff5d6c;
  --chip-bg: #e8ebf1;
  --chip-text: #0b0f17;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.45), 0 18px 44px rgba(0, 0, 0, 0.5);
  --header-bg: rgba(11, 15, 23, 0.85);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

/* Hidden off-screen towards inline-start: that direction never creates
   scrollable overflow, in LTR or RTL (left:-9999px would add a huge
   horizontal scroll area on RTL pages). */
.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus { inset-inline-start: 0; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.brand svg { width: 30px; height: 30px; flex: none; }
.brand .brand-accent { color: var(--accent); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  overflow-x: auto;
}

.site-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--accent); }

.lang-switch {
  flex: none;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.lang-switch:hover { border-color: var(--accent); color: var(--accent); }

.theme-toggle {
  flex: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.theme-toggle:hover { background: var(--surface-2); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

.site-header.is-scrolled { box-shadow: var(--shadow); }

/* Hamburger menu button, hidden on desktop and only shown on mobile when JS is
   available. Without JS the .site-nav keeps its scrollable fallback (below). */
.nav-toggle {
  display: none;
  flex: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.nav-toggle:hover { background: var(--surface-2); }
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 720px) {
  /* Show the menu button and push the controls (language switcher, theme
     toggle, menu button) to the far side */
  .js .nav-toggle { display: inline-flex; }
  .js .lang-switch { margin-left: auto; }
  [dir="rtl"].js .lang-switch { margin-left: 0; margin-right: auto; }

  /* Collapse the nav into a dropdown panel that drops from under the header */
  .js .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    margin: 0;
    padding: 0.6rem;
    overflow: hidden;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lift);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }
  .js .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .js .site-nav a {
    padding: 0.7rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
  }
  .js .site-nav a[aria-current="page"] { background: var(--surface-2); }
}

/* --------------------------------------------------------------------------
   Headline ticker (homepage). Pure CSS animation over real, crawlable links;
   pauses on hover/focus and stays static for reduced-motion users.
   -------------------------------------------------------------------------- */

.ticker {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.ticker .container {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.ticker-label {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-contrast);
  background: var(--accent);
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  margin: 0.45rem 0;
}
.ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: ticker-pulse 1.6s ease-in-out infinite;
}
@keyframes ticker-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.ticker-viewport {
  flex: 1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 50s linear infinite;
}
.ticker:hover .ticker-track,
.ticker:focus-within .ticker-track { animation-play-state: paused; }
.ticker-track ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}
.ticker-track li { flex: none; display: flex; align-items: center; }
.ticker-track li::after { content: "•"; margin: 0 1.1rem; color: var(--accent); }
.ticker-track a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.55rem 0;
  white-space: nowrap;
}
.ticker-track a:hover { color: var(--accent); }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track ul[aria-hidden="true"] { display: none; }
  .ticker-viewport {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* --------------------------------------------------------------------------
   Scroll enhancements (added by JS only, so no-JS visitors and crawlers
   always get fully visible content)
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 60;
  pointer-events: none;
}

.to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lift);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.15s ease, border-color 0.15s ease;
  z-index: 55;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { color: var(--accent); border-color: var(--accent); }
.to-top svg { width: 20px; height: 20px; }

/* --------------------------------------------------------------------------
   Section titles & chips
   -------------------------------------------------------------------------- */

.section-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 2.5rem 0 1.25rem;
}
.section-title::before {
  content: "";
  width: 6px;
  height: 1.35em;
  border-radius: 3px;
  background: var(--accent);
  flex: none;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
}

.chip {
  display: inline-block;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }

.category-chip {
  display: inline-block;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-contrast);
}
.category-chip:hover { background: var(--accent-hover); }

/* --------------------------------------------------------------------------
   Hero (featured article)
   -------------------------------------------------------------------------- */

.hero { margin-top: 2rem; }

.hero-card {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.hero-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }

.hero-card .hero-media { position: relative; min-height: 320px; }
.hero-card .hero-media { overflow: hidden; }
.hero-card .hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-card:hover .hero-media img { transform: scale(1.04); }

.hero-card .hero-body {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.9rem;
}

.hero-card h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3.2vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 800;
}
.hero-card h2 a { text-decoration: none; }
.hero-card h2 a:hover { color: var(--accent); }

.hero-card .hero-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

@media (max-width: 780px) {
  .hero-card { grid-template-columns: 1fr; }
  .hero-card .hero-media { min-height: 220px; }
  .hero-card .hero-body { padding: 1.5rem; }
}

/* --------------------------------------------------------------------------
   Article cards
   -------------------------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-lift); transform: translateY(-3px); }

.card-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.card:hover .card-media img { transform: scale(1.05); }

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.card h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
  font-weight: 800;
}
.card h3 a { text-decoration: none; }
.card h3 a:hover { color: var(--accent); }

.card .card-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.83rem;
  margin-top: auto;
}
.meta .dot { opacity: 0.5; }

/* --------------------------------------------------------------------------
   Article page
   -------------------------------------------------------------------------- */

.breadcrumbs {
  margin: 1.75rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.breadcrumbs li + li::before { content: "›"; margin-right: 0.4rem; opacity: 0.6; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }

.article-header { max-width: 780px; margin: 1.5rem auto 0; }

.article-header h1 {
  margin: 0.75rem 0 0.75rem;
  font-size: clamp(1.8rem, 4.5vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.article-header .article-lede {
  margin: 0;
  font-size: 1.15rem;
  color: var(--muted);
}

.article-header .meta { margin-top: 1rem; font-size: 0.9rem; }

.article-hero-img {
  max-width: 980px;
  margin: 1.75rem auto 0;
}
.article-hero-img img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.article-hero-img figcaption {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.5rem;
  text-align: center;
}

.prose {
  max-width: 780px;
  margin: 1.5rem auto 0;
  font-size: 1.06rem;
  line-height: 1.75;
}
.prose p { margin: 1.2rem 0; }
.prose h2 {
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 2.4rem 0 0.8rem;
  font-weight: 800;
}
.prose h3 {
  font-size: 1.2rem;
  margin: 1.8rem 0 0.6rem;
  font-weight: 800;
}
.prose h2, .prose h3, .prose h4 { scroll-margin-top: 90px; }
.prose a { color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
.prose a:hover { color: var(--accent-hover); }
.prose ul, .prose ol { margin: 1.2rem 0; padding-left: 1.4rem; }
.prose li { margin: 0.45rem 0; }
.prose li::marker { color: var(--accent); font-weight: 700; }
.prose blockquote {
  margin: 1.8rem 0;
  padding: 0.9rem 1.4rem;
  border-left: 4px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.prose blockquote p { margin: 0; }
.prose img { border-radius: var(--radius-sm); margin: 1.5rem 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.prose code {
  background: var(--surface-2);
  padding: 0.15em 0.4em;
  border-radius: 6px;
  font-size: 0.92em;
}

/* Tags + share */

.article-footer {
  max-width: 780px;
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.tag-list { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

.share-row { display: flex; align-items: center; gap: 0.5rem; }
.share-row a, .share-row button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.share-row a:hover, .share-row button:hover { border-color: var(--accent); color: var(--accent); }

/* Related */

.related { margin-top: 3rem; }

/* --------------------------------------------------------------------------
   Category / listing pages
   -------------------------------------------------------------------------- */

.page-header { margin: 2.5rem 0 1.5rem; max-width: 780px; }
.page-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  letter-spacing: -0.03em;
  font-weight: 800;
}
.page-header p { margin: 0; color: var(--muted); font-size: 1.05rem; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding: 2.5rem 0;
}
@media (max-width: 700px) {
  .site-footer .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

.site-footer h2 {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
  color: var(--muted);
}
.site-footer p { margin: 0; color: var(--muted); font-size: 0.93rem; max-width: 42ch; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.35rem 0; }
.site-footer a { color: var(--text); text-decoration: none; font-size: 0.93rem; }
.site-footer a:hover { color: var(--accent); }

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.social-links svg { width: 18px; height: 18px; flex: none; }

.site-footer .footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.1rem 0;
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */

.error-page {
  text-align: center;
  padding: 5rem 1rem;
}
.error-page .error-code {
  font-size: 5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--accent);
  line-height: 1;
  margin: 0;
}
.error-page h1 { margin: 0.75rem 0; letter-spacing: -0.02em; }
.error-page p { color: var(--muted); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
  text-decoration: none;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--accent-hover); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   RTL (Arabic) support. Flexbox/grid flip automatically with dir="rtl";
   these rules cover the physical properties and typography that don't.
   -------------------------------------------------------------------------- */

/* Arabic-friendly system font stack (no external requests) */
[dir="rtl"] body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, "Noto Sans Arabic",
    "Noto Kufi Arabic", "Helvetica Neue", Arial, sans-serif;
}

/* Letter-spacing (positive or negative) breaks Arabic cursive joining */
[dir="rtl"] .brand,
[dir="rtl"] .ticker-label,
[dir="rtl"] .section-title,
[dir="rtl"] .category-chip,
[dir="rtl"] .hero-card h2,
[dir="rtl"] .card h3,
[dir="rtl"] .article-header h1,
[dir="rtl"] .prose h2,
[dir="rtl"] .prose blockquote,
[dir="rtl"] .page-header h1,
[dir="rtl"] .site-footer h2,
[dir="rtl"] .error-page h1 {
  letter-spacing: 0;
}

/* Header: push the nav to the far (left) edge in RTL */
[dir="rtl"] .site-nav { margin-left: 0; margin-right: auto; }

/* Ticker scrolls the other way in RTL */
[dir="rtl"] .ticker-track { animation-name: ticker-scroll-rtl; }
@keyframes ticker-scroll-rtl {
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}

/* Breadcrumb separator points the other way */
[dir="rtl"] .breadcrumbs li + li::before {
  content: "‹";
  margin-right: 0;
  margin-left: 0.4rem;
}

/* Article prose: mirror list indentation and blockquote accent bar */
[dir="rtl"] .prose ul,
[dir="rtl"] .prose ol {
  padding-left: 0;
  padding-right: 1.4rem;
}
[dir="rtl"] .prose blockquote {
  border-left: 0;
  border-right: 4px solid var(--accent);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

/* Reading progress bar grows from the right */
[dir="rtl"] .reading-progress { transform-origin: 100% 50%; }

/* Tags are Latin slugs ("#morocco"); keep the # on the correct side in RTL */
[dir="rtl"] .tag { direction: ltr; }
