/* =========================================================
   KurdNet — design system
   Light + dark theme, responsive, reduced-motion friendly
   ========================================================= */

:root {
  --font-sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;

  --bg: #f4f7fb;
  --bg-alt: #edf3f9;
  --surface: #ffffff;
  --surface-2: #f7fafd;
  --surface-3: #e8f0f8;
  --text: #0a2136;
  --text-soft: #3f5c75;
  --text-muted: #587189;
  --border: rgba(10, 40, 66, 0.09);
  --border-strong: rgba(10, 40, 66, 0.16);

  --brand: #0b5d8c;
  --brand-2: #0a7bbd;
  --brand-soft: #e4f2fb;
  --accent: #1ea6f5;
  --gold: #d9a52c;
  --gold-2: #f4d26d;
  --gold-soft: #f8e9bd;
  --danger: #d64545;
  --success: #1f9d6b;

  --navy-950: #041827;
  --navy-900: #07263d;
  --navy-800: #0a3857;

  --shadow-sm: 0 1px 2px rgba(7, 32, 52, 0.06);
  --shadow-md: 0 12px 32px rgba(7, 32, 52, 0.09);
  --shadow-lg: 0 28px 70px rgba(7, 32, 52, 0.14);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --header-bg: rgba(255, 255, 255, 0.88);
  --header-height: 76px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

[data-theme="dark"] {
  --bg: #07131f;
  --bg-alt: #0a1927;
  --surface: #0e2132;
  --surface-2: #122a3e;
  --surface-3: #17344b;
  --text: #edf6ff;
  --text-soft: #b3c8da;
  --text-muted: #8aa4b8;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --brand: #7fd4ff;
  --brand-2: #9fe0ff;
  --brand-soft: rgba(30, 166, 245, 0.15);
  --gold: #f4d26d;
  --gold-soft: rgba(244, 210, 109, 0.16);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 14px 36px rgba(0, 0, 0, 0.34);
  --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.46);

  --header-bg: rgba(7, 19, 31, 0.88);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1100px 500px at 12% -8%, rgba(30, 166, 245, 0.08), transparent 60%),
    radial-gradient(900px 460px at 100% 0%, rgba(244, 210, 109, 0.08), transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.25s ease, color 0.25s ease;
}

body.nav-open {
  overflow: hidden;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

::selection {
  background: rgba(30, 166, 245, 0.28);
}

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

.container {
  width: min(1220px, calc(100% - 40px));
  margin-inline: auto;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  box-shadow: var(--shadow-md);
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

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

/* ---------------------------------------------------------
   Top bar
   --------------------------------------------------------- */

.topbar {
  background: linear-gradient(90deg, #041d2f, #0b3557 42%, #062843 100%);
  color: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 9px 0;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.topbar-tagline {
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.02em;
}

.topbar-right {
  letter-spacing: 0.03em;
  font-weight: 600;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 700;
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-2);
  box-shadow: 0 0 12px rgba(244, 210, 109, 0.9);
}

.pill-soft {
  background: rgba(30, 166, 245, 0.16);
  border-color: rgba(127, 212, 255, 0.24);
  color: #cdeaff;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.25s ease, background-color 0.25s ease;
}

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

.header-inner {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-mark {
  height: 52px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

.brand-text {
  display: block;
}

.brand-text strong {
  display: block;
  color: var(--text);
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.05;
}

.brand-text > span {
  display: block;
  color: var(--text-muted);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 4px;
  white-space: nowrap;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.nav-link,
.nav-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  background: var(--brand-soft);
  color: var(--brand);
}

.nav-link.active {
  box-shadow: inset 0 0 0 1px rgba(30, 166, 245, 0.22);
}

.nav-cta {
  margin-left: 4px;
  background: linear-gradient(135deg, var(--gold-2), #f8e6a4);
  color: #0a2436;
  box-shadow: 0 8px 18px rgba(244, 210, 109, 0.24);
}

.nav-cta:hover,
.nav-cta:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(244, 210, 109, 0.32);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.site-search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-search:focus-within {
  border-color: rgba(30, 166, 245, 0.45);
  box-shadow: 0 0 0 4px rgba(30, 166, 245, 0.12);
}

.search-icon {
  color: var(--text-muted);
  flex: 0 0 auto;
}

.site-search input {
  width: 130px;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 6px 0;
}

.site-search input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}

.site-search button {
  border: 0;
  border-radius: var(--radius-pill);
  padding: 8px 6px;
  background: linear-gradient(135deg, var(--brand-2), var(--accent));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-search button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(30, 166, 245, 0.28);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-soft);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.icon-btn:hover {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: rgba(30, 166, 245, 0.3);
  transform: translateY(-1px);
}

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

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

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

.menu-toggle {
  display: none;
  width: 44px;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  place-items: center;
}

.menu-bars {
  display: grid;
  gap: 5px;
  width: 20px;
}

.menu-bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] .menu-bars span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-bars span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-bars span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-search {
  display: none;
}

/* ---------------------------------------------------------
   Buttons, chips, shared bits
   --------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.2;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-2), #f9e193);
  color: #071d2d;
  box-shadow: 0 14px 26px rgba(244, 206, 100, 0.24);
}

.btn-primary:hover {
  box-shadow: 0 18px 32px rgba(244, 206, 100, 0.32);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-ghost {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text-soft);
}

.btn-ghost:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-block {
  width: 100%;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.letter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.letter-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.letter-count {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--text-soft);
  opacity: 1;
}

.letter-link.active .letter-count,
.letter-link:hover .letter-count {
  color: inherit;
}

.letter-link:hover {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: var(--brand);
}

.letter-link.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.chip-row-center {
  justify-content: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.chip:hover,
.chip.active {
  background: var(--brand-soft);
  border-color: rgba(30, 166, 245, 0.3);
  color: var(--brand);
}

.chip-sm {
  padding: 4px 10px;
  font-size: 0.74rem;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  padding: 64px 24px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-xl);
  color: var(--text-soft);
}

.empty-state > span {
  font-size: 2.6rem;
  line-height: 1;
}

.empty-state h2 {
  margin: 0;
  font-size: 1.4rem;
  color: var(--text);
}

.empty-state p {
  margin: 0;
  max-width: 46ch;
}

.empty-state .btn {
  margin-top: 8px;
}

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(900px 420px at 8% 0%, rgba(30, 166, 245, 0.22), transparent 58%),
    radial-gradient(760px 380px at 92% 8%, rgba(244, 210, 109, 0.12), transparent 55%),
    linear-gradient(135deg, #04121e 0%, #0a2a42 55%, #071827 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 88%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 88%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: start;
  gap: 48px;
  padding: 12px 0 62px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #9fe0ff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-2);
  box-shadow: 0 0 16px rgba(244, 210, 109, 0.9);
}

.hero h1 {
  margin: 20px 0 18px;
  font-size: clamp(3rem, 6vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
  font-weight: 800;
  color: #fff;
}

.hero-lead {
  margin: 0;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.04rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.hero-stats {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.stat {
  min-width: 118px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
}

.stat strong {
  display: block;
  color: var(--gold-2);
  font-size: 1.8rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat span {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  margin-top: 6px;
  letter-spacing: 0.03em;
}

/* Featured rail */

.featured-rail {
  display: grid;
  gap: 16px;
  min-width: 0;
  margin-top: 64px;
}

.featured-story {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(8, 22, 34, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.32);
}

.featured-story-image {
  display: block;
  aspect-ratio: 25 / 6;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 166, 245, 0.18), rgba(244, 210, 109, 0.12));
}

.featured-story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.featured-story:hover .featured-story-image img {
  transform: scale(1.04);
}

.featured-story-content {
  padding: 16px 18px 20px;
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 90, 70, 0.14);
  border: 1px solid rgba(255, 107, 84, 0.34);
  color: #ffb2a9;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.featured-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff5246;
  box-shadow: 0 0 14px rgba(255, 82, 70, 0.9);
}

.featured-story h2 {
  margin: 11px 0 10px;
  font-size: clamp(1.35rem, 1.8vw, 1.8rem);
  line-height: 1.16;
  letter-spacing: -0.035em;
}

.featured-story h2 a {
  color: #f4fbff;
}

.featured-story h2 a:hover {
  color: var(--gold-2);
}

.story-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.story-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: rgba(109, 158, 255, 0.14);
  border: 1px solid rgba(109, 158, 255, 0.26);
  color: #b8d5ff;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.story-meta time {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.featured-story p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
  font-size: 0.92rem;
}

.latest-news-stack {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(8, 22, 34, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
}

.stack-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(90deg, rgba(30, 166, 245, 0.14), rgba(255, 255, 255, 0.02));
}

.stack-header span {
  color: #9fe0ff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stack-header a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stack-header a:hover {
  color: var(--gold-2);
}

.latest-news-list {
  display: grid;
  padding: 6px 16px 12px;
}

.latest-news-card {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.latest-news-card:last-child {
  border-bottom: none;
}

.latest-news-thumb {
  display: block;
  width: 66px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.latest-news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.latest-news-thumb-empty {
  background: linear-gradient(135deg, rgba(127, 212, 255, 0.14), rgba(244, 210, 109, 0.1));
}

.latest-news-copy {
  min-width: 0;
}

.latest-news-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 3px;
  color: #9ed0ff;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.latest-news-copy h3 {
  margin: 0 0 3px;
  font-size: 0.86rem;
  line-height: 1.4;
}

.latest-news-copy h3 a {
  color: #fff;
}

.latest-news-copy h3 a:hover {
  color: var(--gold-2);
}

.latest-news-copy time {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

/* ---------------------------------------------------------
   Ticker (modern news bar)
   --------------------------------------------------------- */

.ticker-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: 46px;
  border-top: 1px solid rgba(255, 210, 109, 0.18);
  border-bottom: 1px solid rgba(255, 210, 109, 0.12);
  background:
    linear-gradient(100deg, #061420 0%, #0a2236 45%, #061420 100%);
  color: #fff;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(4, 24, 39, 0.18);
}

.ticker-label {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  background: linear-gradient(135deg, #d9a52c, #f4d26d);
  color: #1a2330;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  position: relative;
  z-index: 3;
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  padding-right: 26px;
}

.ticker-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1a2330;
  box-shadow: 0 0 0 0 rgba(26, 35, 48, 0.55);
  animation: ticker-pulse 1.6s ease-out infinite;
}

@keyframes ticker-pulse {
  0% { box-shadow: 0 0 0 0 rgba(26, 35, 48, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(26, 35, 48, 0); }
  100% { box-shadow: 0 0 0 0 rgba(26, 35, 48, 0); }
}

.ticker-viewport {
  flex: 1 1 auto;
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}

.ticker {
  display: flex;
  align-items: center;
  width: max-content;
  padding: 6px 0;
  animation: ticker-scroll 58s linear infinite;
  will-change: transform;
}

.ticker-wrap:hover .ticker,
.ticker-wrap:focus-within .ticker {
  animation-play-state: paused;
}

.ticker-group {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  padding-right: 2.2rem;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.82rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.ticker-item:hover {
  color: var(--gold-2);
}

.ticker-cat {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(244, 210, 109, 0.14);
  border: 1px solid rgba(244, 210, 109, 0.28);
  color: var(--gold-2);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ticker-title {
  max-width: 46ch;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticker-item time {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ticker-item time::before {
  content: "•";
  margin-right: 8px;
  color: rgba(244, 210, 109, 0.5);
}

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

/* ---------------------------------------------------------
   Sections
   --------------------------------------------------------- */

.section {
  padding: 72px 0;
}

.section-alt {
  background: linear-gradient(180deg, var(--bg-alt), color-mix(in srgb, var(--bg-alt) 55%, var(--bg)));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 30px;
}

.section-head > div {
  min-width: 0;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--brand);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

.section h2,
.page-hero h1,
.newsletter h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.75rem, 2.7vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.section-sub {
  margin: 10px 0 0;
  color: var(--text-muted);
  max-width: 62ch;
  font-size: 0.96rem;
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--brand);
  font-weight: 800;
  font-size: 0.9rem;
  white-space: nowrap;
}

.link-more span {
  transition: transform 0.2s ease;
}

.link-more:hover span {
  transform: translateX(4px);
}

/* ---------------------------------------------------------
   Cards
   --------------------------------------------------------- */

.card,
.mini-card,
.news-card,
.category-card,
.media-card,
.author-card,
.blog-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.24s var(--ease), box-shadow 0.24s var(--ease), border-color 0.24s ease;
}

.card:hover,
.mini-card:hover,
.category-card:hover,
.media-card:hover,
.author-card:hover,
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.card-cover,
.mini-cover,
.blog-cover,
.media-cover,
.news-cover,
.news-thumb,
.article-cover {
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
}

.card-cover img,
.mini-cover img,
.blog-cover img,
.media-cover img,
.news-cover img,
.news-thumb img,
.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.card:hover .card-cover img,
.mini-card:hover .mini-cover img,
.blog-card:hover .blog-cover img,
.media-card:hover .media-cover img {
  transform: scale(1.045);
}

.card-cover,
.news-cover {
  aspect-ratio: 16 / 9;
}

.mini-cover {
  aspect-ratio: 16 / 10;
}

.blog-cover {
  aspect-ratio: 16 / 10;
}

.card-body,
.mini-body {
  padding: 20px 22px 22px;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta-row time {
  color: var(--text-muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  border: 1px solid rgba(30, 166, 245, 0.18);
  color: var(--brand);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background-color 0.2s ease;
}

.tag:hover {
  background: rgba(30, 166, 245, 0.22);
}

.card-body h3,
.mini-body h3,
.news-copy h3,
.blog-body h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 1.22rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.card-body h3 a,
.mini-body h3 a,
.news-copy h3 a,
.blog-body h3 a {
  background-image: linear-gradient(90deg, var(--accent), var(--gold));
  background-repeat: no-repeat;
  background-size: 0% 2px;
  background-position: 0 100%;
  transition: background-size 0.28s var(--ease), color 0.2s ease;
}

.card-body h3 a:hover,
.mini-body h3 a:hover,
.news-copy h3 a:hover,
.blog-body h3 a:hover {
  background-size: 100% 2px;
}

.card-body p,
.mini-body p,
.category-card p,
.news-card p,
.media-card p,
.author-card p,
.blog-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
  font-size: 0.94rem;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 800;
}

.card-link span {
  transition: transform 0.2s ease;
}

.card-link:hover span,
.card:hover .card-link span {
  transform: translateX(3px);
}

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

.featured-grid .article-card {
  display: flex;
  flex-direction: column;
}

.featured-grid .article-card .card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.featured-grid .article-card .card-foot {
  margin-top: auto;
}

/* Categories */

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

.category-grid-sm {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.category-card {
  display: flex;
  flex-direction: column;
  color: inherit;
}

.category-card .ic {
  display: grid;
  place-items: center;
  height: 96px;
  font-size: 2.35rem;
  line-height: 1;
  background:
    radial-gradient(120px 80px at 30% 20%, rgba(255, 255, 255, 0.5), transparent 70%),
    linear-gradient(135deg, rgba(30, 166, 245, 0.16), rgba(244, 210, 109, 0.2));
  border-bottom: 1px solid var(--border);
}

.category-card .content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 20px 20px;
}

.category-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.category-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.category-count {
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.64rem;
  font-weight: 800;
  white-space: nowrap;
}

.category-card .card-link {
  margin-top: auto;
  padding-top: 14px;
}

/* ---------------------------------------------------------
   News + sidebar
   --------------------------------------------------------- */

.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
  gap: 26px;
  align-items: start;
}

.news-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.news-item {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease;
}

.news-item:last-child {
  border-bottom: none;
}

.news-item:hover {
  background: var(--surface-2);
}

.news-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.news-copy {
  min-width: 0;
}

.news-copy h3 {
  font-size: 1.12rem;
  margin-bottom: 7px;
}

.news-copy p {
  margin: 0 0 9px;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.65;
}

.news-meta {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.sidebar {
  display: grid;
  gap: 18px;
  position: sticky;
  top: calc(var(--header-height) + 20px);
}

.side-card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.side-card > h3 {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.rank-list li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.rank-list li:first-child {
  padding-top: 0;
}

.rank-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 800;
}

.rank-list a {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

.rank-list a:hover {
  color: var(--brand);
}

.rank-meta {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.side-cta {
  color: #fff;
  background:
    radial-gradient(300px 180px at 100% 0%, rgba(244, 210, 109, 0.18), transparent 70%),
    linear-gradient(150deg, #062b43, #0b466b);
  border-color: rgba(127, 212, 255, 0.2);
}

.side-cta .kicker {
  color: #9fe0ff;
}

.side-cta > h3 {
  color: #fff;
  font-size: 1.3rem;
  line-height: 1.25;
}

.side-cta p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* ---------------------------------------------------------
   Media
   --------------------------------------------------------- */

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

.media-cover {
  position: relative;
  aspect-ratio: 16 / 9;
}

.media-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 18, 30, 0.05), rgba(4, 18, 30, 0.35));
  transition: background-color 0.25s ease;
}

.media-play {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: #fff;
}

.media-play svg {
  width: 54px;
  height: 54px;
  padding: 16px;
  border-radius: 50%;
  background: rgba(4, 18, 30, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(6px);
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.media-card:hover .media-play svg {
  transform: scale(1.08);
  background: rgba(30, 166, 245, 0.75);
}

.media-type {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(4, 18, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.media-body {
  padding: 18px 20px 22px;
}

.media-body h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 1.12rem;
  line-height: 1.35;
}

/* ---------------------------------------------------------
   Authors
   --------------------------------------------------------- */

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

.author-card {
  padding: 24px 20px 22px;
  text-align: center;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

.author-avatar {
  width: 92px;
  height: 92px;
  margin: 0 auto 16px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-3);
  border: 4px solid var(--brand-soft);
  box-shadow: 0 10px 22px rgba(14, 35, 53, 0.12);
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-avatar-sm {
  width: 48px;
  height: 48px;
  margin: 0;
  border-width: 3px;
  box-shadow: none;
}

.author-card h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 1.08rem;
}

.author-role {
  display: inline-block;
  color: var(--brand);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.author-card .author-role {
  margin-bottom: 10px;
}

.author-card p {
  font-size: 0.88rem;
}

.author-count {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 800;
}

/* ---------------------------------------------------------
   Blog
   --------------------------------------------------------- */

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

.blog-card {
  display: flex;
  flex-direction: column;
}

.blog-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 22px 22px;
}

.blog-body .card-link {
  margin-top: auto;
  padding-top: 14px;
}

/* ---------------------------------------------------------
   Newsletter
   --------------------------------------------------------- */

.newsletter {
  overflow: hidden;
  border-radius: var(--radius-xl);
  color: #fff;
  background:
    radial-gradient(600px 300px at 90% 0%, rgba(244, 210, 109, 0.16), transparent 60%),
    radial-gradient(500px 320px at 0% 100%, rgba(30, 166, 245, 0.2), transparent 65%),
    linear-gradient(135deg, #041827, #0a3a58 60%, #062b43);
  border: 1px solid rgba(149, 214, 255, 0.16);
  box-shadow: var(--shadow-lg);
}

.newsletter-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 40px;
  align-items: center;
  padding: 44px 40px;
}

.newsletter .kicker {
  color: #9fe0ff;
}

.newsletter h2 {
  color: #fff;
  font-size: clamp(1.7rem, 2.6vw, 2.4rem);
  margin-bottom: 12px;
}

.newsletter p {
  margin: 0;
  max-width: 58ch;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.75;
}

.newsletter-points {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.newsletter-points li {
  position: relative;
  padding-left: 26px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
}

.newsletter-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: -1px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(244, 210, 109, 0.2);
  color: var(--gold-2);
  font-size: 0.68rem;
  font-weight: 800;
}

.newsletter-form {
  display: grid;
  gap: 12px;
}

.newsletter-field {
  display: flex;
  gap: 10px;
  padding: 6px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.newsletter-field:focus-within {
  border-color: rgba(127, 212, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(30, 166, 245, 0.14);
}

.newsletter-field input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #fff;
  outline: none;
  padding: 10px 12px;
  font-size: 0.94rem;
}

.newsletter-field input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.newsletter-field button {
  flex: 0 0 auto;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--gold-2), #f8e193);
  color: #071c2d;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.newsletter-field button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(241, 199, 93, 0.24);
}

.form-hint {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.78rem;
}

.form-messages {
  display: grid;
  gap: 8px;
}

.form-message {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 600;
}

.form-message.success {
  background: rgba(74, 224, 173, 0.14);
  border: 1px solid rgba(74, 224, 173, 0.35);
  color: #dffef4;
}

.form-message.info {
  background: rgba(126, 170, 255, 0.14);
  border: 1px solid rgba(126, 170, 255, 0.28);
  color: #e7f0ff;
}

.form-message.error {
  background: rgba(255, 133, 133, 0.14);
  border: 1px solid rgba(255, 133, 133, 0.3);
  color: #ffe6e6;
}

/* ---------------------------------------------------------
   Page hero / breadcrumbs
   --------------------------------------------------------- */

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 44px 0 40px;
  background:
    radial-gradient(700px 300px at 88% 0%, rgba(30, 166, 245, 0.12), transparent 60%),
    linear-gradient(180deg, var(--surface), var(--bg-alt));
  border-bottom: 1px solid var(--border);
}

.page-hero-sm {
  padding: 36px 0 34px;
}

.page-hero .container {
  max-width: 1000px;
}

.page-hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  margin-bottom: 12px;
  background: linear-gradient(120deg, var(--brand), var(--accent) 45%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section h2 {
  background: linear-gradient(120deg, var(--text), var(--brand));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-lead {
  margin: 0;
  max-width: 68ch;
  color: var(--text-soft);
  font-size: 1.02rem;
  line-height: 1.75;
}

.page-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  border: 1px solid rgba(30, 166, 245, 0.2);
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.breadcrumb a {
  color: var(--text-soft);
}

.breadcrumb a:hover {
  color: var(--brand);
}

.breadcrumb span[aria-hidden] {
  color: var(--border-strong);
}

.breadcrumb [aria-current="page"] {
  color: var(--text);
  font-weight: 700;
}

/* Search page */

.search-page-form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 6px 6px 6px 16px;
  max-width: 680px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.search-page-form > svg {
  color: var(--text-muted);
  flex: 0 0 auto;
}

.search-page-form input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  padding: 12px 4px;
  font-size: 0.98rem;
  font-weight: 600;
}

.search-page-form input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}

.search-page-form .btn {
  flex: 0 0 auto;
  padding: 11px 18px;
}

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

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 60;
  background: transparent;
  pointer-events: none;
}

.reading-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--gold-2));
  transition: width 0.1s linear;
}

.article-shell {
  padding-top: 36px;
}

.article-container {
  max-width: 900px;
}

.article-header {
  padding-bottom: 30px;
}

.article-header > .tag {
  margin-bottom: 16px;
}

.article-header h1 {
  margin: 0 0 16px;
  color: var(--text);
  font-size: clamp(2.05rem, 4vw, 3.35rem);
  line-height: 1.1;
  letter-spacing: -0.045em;
  font-weight: 800;
}

.article-dek {
  margin: 0 0 24px;
  color: var(--text-soft);
  font-size: 1.12rem;
  line-height: 1.7;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.article-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.article-author strong {
  display: block;
  color: var(--text);
  font-size: 0.92rem;
}

.article-author span {
  display: block;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.article-meta-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.article-cover-wrap {
  max-width: 1100px;
}

.article-cover {
  margin: 0 0 34px;
  aspect-ratio: 16 / 8;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.article-body-wrap {
  max-width: 800px;
}

.article-content {
  color: var(--text-soft);
  font-size: 1.06rem;
  line-height: 1.9;
}

.article-content p {
  margin: 0 0 1.35em;
}

.article-content > p:first-of-type {
  font-size: 1.14rem;
  color: var(--text);
}

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

.article-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin: 34px 0;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.share-label {
  margin-right: 4px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.share-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 800;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.share-btn:hover {
  background: var(--brand-soft);
  border-color: rgba(30, 166, 245, 0.3);
  color: var(--brand);
  transform: translateY(-1px);
}

.back-link {
  color: var(--brand);
  font-size: 0.86rem;
  font-weight: 800;
}

.author-box {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.author-box .author-avatar {
  flex: 0 0 auto;
  margin: 0;
}

.author-box h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.author-box p {
  margin: 0 0 8px;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ---------------------------------------------------------
   About
   --------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.45fr);
  gap: 26px;
  align-items: start;
}

.about-main {
  padding: 34px 36px;
}

.about-main h2 {
  margin: 0 0 16px;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  line-height: 1.2;
}

.about-main p {
  margin: 0 0 16px;
  color: var(--text-soft);
  line-height: 1.85;
}

.about-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.about-points strong {
  display: block;
  color: var(--brand);
  font-size: 0.86rem;
  margin-bottom: 4px;
}

.about-points span {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

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

.stat-card {
  padding: 20px 16px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.stat-card strong {
  display: block;
  color: var(--brand);
  font-size: 1.9rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat-card span {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.about-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.value-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.value-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: var(--radius-md);
  background: var(--brand-soft);
  font-size: 1.3rem;
}

.value-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.value-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.7;
}

.about-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 26px;
  padding: 30px 32px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(244, 210, 109, 0.16), transparent 65%),
    linear-gradient(135deg, #062b43, #0b466b);
  color: #fff;
}

.about-cta .kicker {
  color: #9fe0ff;
}

.about-cta h2 {
  color: #fff;
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
}

.about-cta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
}

/* ---------------------------------------------------------
   Dictionary
   --------------------------------------------------------- */

.dictionary-toolbar {
  padding: 20px;
  margin-bottom: 22px;
}

.dictionary-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-grow {
  flex: 1 1 260px;
}

.dictionary-form input,
.dictionary-form select {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  outline: none;
  font-size: 0.92rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dictionary-form input:focus,
.dictionary-form select:focus {
  border-color: rgba(30, 166, 245, 0.55);
  box-shadow: 0 0 0 4px rgba(30, 166, 245, 0.12);
}

.dictionary-form .btn {
  padding: 11px 18px;
}

.word-of-day {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 24px;
  align-items: center;
  padding: 26px 28px;
  margin-bottom: 22px;
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(244, 210, 109, 0.2), transparent 65%),
    linear-gradient(135deg, var(--brand-soft), var(--surface));
}

.word-of-day h2 {
  margin: 0 0 6px;
  font-size: 1.9rem;
  letter-spacing: -0.03em;
}

.word-of-day p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.word-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.word-grid > div {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}

.word-grid dt {
  color: var(--text-muted);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.word-grid dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  font-size: 0.92rem;
}

.dictionary-table-wrap {
  overflow: hidden;
}

.dictionary-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.dictionary-table th,
.dictionary-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.dictionary-table thead th {
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dictionary-table tbody th {
  color: var(--text);
  font-size: 1rem;
}

.dictionary-table tbody td {
  color: var(--text-soft);
}

.dictionary-table tbody tr:last-child th,
.dictionary-table tbody tr:last-child td {
  border-bottom: none;
}

.dictionary-table tbody tr:hover {
  background: var(--surface-2);
}

.dictionary-table tbody tr:nth-child(even) {
  background: rgba(10, 40, 66, 0.025);
}

[data-theme="dark"] .dictionary-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.025);
}

.dictionary-table tbody tr:hover {
  background: var(--brand-soft);
}

/* ---------------------------------------------------------
   Proverbs (dictionary)
   --------------------------------------------------------- */

.proverbs-details {
  margin-bottom: 22px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.proverbs-summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.proverbs-summary::-webkit-details-marker {
  display: none;
}

.proverbs-summary h2 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.proverbs-summary p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.proverbs-toggle-hint {
  color: var(--brand);
  font-weight: 700;
}

.proverbs-details .proverb-grid {
  padding: 0 22px 22px;
}

.proverb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.proverb-card {
  padding: 20px 20px 16px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s ease;
}

.proverb-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.proverb-text {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
}

.proverb-translations {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
}

.proverb-translations > div {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.proverb-translations dt {
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.proverb-translations dd {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.85rem;
  font-weight: 600;
}

.proverb-tag {
  align-self: flex-start;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--gold-soft);
  color: #6b5200;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

[data-theme="dark"] .proverb-tag {
  color: var(--gold-2);
}

.dictionary-table tbody th strong {
  color: var(--brand);
}

.dictionary-table td[data-label="Qad"] .chip {
  font-size: 0.62rem;
}

.letter-bar {
  scrollbar-width: thin;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.page-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 0.85rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.page-link:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

.page-info {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
}

@media (max-width: 720px) {
  .letter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .letter-link {
    flex: 0 0 auto;
  }
}

/* ---------------------------------------------------------
   History page
   --------------------------------------------------------- */

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

.history-card {
  padding: 24px 24px 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-era {
  align-self: flex-start;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.history-card h2 {
  margin: 0;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.history-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.7;
}

.history-list {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.7;
}

.history-list li {
  margin-bottom: 4px;
}

.history-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.history-timeline li {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  font-size: 0.92rem;
  color: var(--text-soft);
  line-height: 1.6;
}

.history-timeline li strong {
  color: var(--brand);
  font-weight: 800;
}

@media (max-width: 720px) {
  .history-grid {
    grid-template-columns: 1fr;
  }
}

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

.footer {
  margin-top: 80px;
  padding: 52px 0 24px;
  background:
    radial-gradient(700px 320px at 10% 0%, rgba(30, 166, 245, 0.12), transparent 60%),
    #031823;
  color: rgba(255, 255, 255, 0.74);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 0.65fr 0.9fr 0.9fr 0.9fr;
  gap: 34px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.footer-logo img {
  height: 46px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

.footer-brand p {
  margin: 0;
  max-width: 42ch;
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.8;
  font-size: 0.9rem;
}

.footer-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
}

.footer-stats strong {
  color: var(--gold-2);
  font-size: 1rem;
  margin-right: 3px;
}

.footer-col h3 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.88rem;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--gold-2);
}

.copyright {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 38px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
}

.copyright-note {
  color: rgba(255, 255, 255, 0.36);
}

/* ---------------------------------------------------------
   Floating UI
   --------------------------------------------------------- */

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 45;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--brand);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--brand-soft);
  transform: translateY(-2px);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  max-width: min(92vw, 420px);
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  background: #0a2436;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 14px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* ---------------------------------------------------------
   Reveal on scroll (JS adds .reveal-ready to body)
   --------------------------------------------------------- */

.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.reveal-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 1180px) {
  .header-inner {
    gap: 14px;
  }

  .site-search input {
    width: 110px;
  }

  .nav-link {
    padding-inline: 10px;
    font-size: 0.82rem;
  }
}

@media (max-width: 1100px) {
  :root {
    --header-height: 70px;
  }

  .site-search {
    display: none;
  }

  .menu-toggle {
    display: grid;
  }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    max-height: calc(100vh - var(--header-height) - 12px);
    overflow-y: auto;
    padding: 14px 20px 22px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    border: 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
  }

  .primary-nav.open {
    display: flex;
  }

  .nav-link,
  .nav-cta {
    justify-content: flex-start;
    min-height: 46px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
  }

  .nav-cta {
    margin: 8px 0 0;
    justify-content: center;
  }

  .mobile-search {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
  }

  .mobile-search input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--surface-2);
    outline: none;
  }

  .mobile-search button {
    border: 0;
    border-radius: var(--radius-sm);
    padding: 11px 8px;
    background: linear-gradient(135deg, var(--brand-2), var(--accent));
    color: #fff;
    font-weight: 700;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 38px;
    padding: 56px 0 52px;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 8vw, 4.4rem);
  }

  .news-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-grid-sm {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .author-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-side {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

@media (max-width: 900px) {
  .featured-grid,
  .category-grid,
  .media-grid,
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .featured-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .newsletter-inner {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 34px 28px;
  }

  .about-values {
    grid-template-columns: 1fr;
  }

  .about-points {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .word-of-day {
    grid-template-columns: 1fr;
  }

  .article-cover {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(1220px, calc(100% - 28px));
  }

  .topbar-tagline {
    display: none;
  }

  .section {
    padding: 54px 0;
  }

  .hero-inner {
    padding: 46px 0 44px;
  }

  .hero-stats {
    gap: 10px;
  }

  .stat {
    flex: 1 1 0;
    min-width: 0;
    padding: 10px 12px;
  }

  .stat strong {
    font-size: 1.5rem;
  }

  .featured-grid,
  .category-grid,
  .media-grid,
  .blog-grid,
  .author-grid,
  .sidebar,
  .category-grid-sm {
    grid-template-columns: 1fr;
  }

  .featured-grid > :last-child:nth-child(odd) {
    grid-column: auto;
  }

  .news-item {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 18px;
  }

  .news-thumb {
    aspect-ratio: 16 / 9;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 26px;
  }

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

  .newsletter-field {
    flex-direction: column;
  }

  .newsletter-field button {
    width: 100%;
    padding: 13px 18px;
  }

  .article-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .author-box {
    flex-direction: column;
  }

  .about-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dictionary-form {
    align-items: stretch;
  }

  .dictionary-form .field,
  .dictionary-form .btn {
    flex: 1 1 100%;
  }

  .dictionary-table thead {
    display: none;
  }

  .dictionary-table,
  .dictionary-table tbody,
  .dictionary-table tr,
  .dictionary-table th,
  .dictionary-table td {
    display: block;
    width: 100%;
  }

  .dictionary-table tr {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
  }

  .dictionary-table tbody tr:last-child {
    border-bottom: none;
  }

  .dictionary-table th,
  .dictionary-table td {
    padding: 4px 0;
    border: 0;
  }

  .dictionary-table tbody th {
    font-size: 1.1rem;
    margin-bottom: 4px;
  }

  .dictionary-table td::before {
    content: attr(data-label);
    display: inline-block;
    min-width: 82px;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .copyright {
    flex-direction: column;
    text-align: center;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
  }
}

@media (max-width: 520px) {
  .brand-text > span {
    display: none;
  }

  .hero h1 {
    font-size: 2.7rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .featured-story h2 {
    font-size: 1.25rem;
  }

  .latest-news-card {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .latest-news-thumb {
    width: 58px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .about-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-main {
    padding: 24px 22px;
  }

  .word-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .ticker-label {
    padding: 0 14px;
    font-size: 0.66rem;
    clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
    padding-right: 18px;
  }

  .ticker-item {
    font-size: 0.78rem;
    gap: 9px;
  }

  .ticker-title {
    max-width: 30ch;
  }

  .ticker-item time {
    display: none;
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
  }

  .carousel-caption {
    padding: 16px 18px;
  }

  .carousel-caption p {
    display: none;
  }
}

@media (max-width: 520px) {
  .ticker-label span:last-child {
    display: none;
  }

  .ticker-pulse {
    margin: 0;
  }

  .carousel-prev { left: 8px; }
  .carousel-next { right: 8px; }
}

/* ---------------------------------------------------------
   Image carousel (changeable images)
   --------------------------------------------------------- */

.section-carousel {
  padding-top: 18px;
}

.section-carousel-compact {
  padding: 0 0 4px;
}

.section-carousel-compact .container {
  max-width: 760px;
}

.section-carousel-compact .section-head {
  margin-bottom: 10px;
}

.section-carousel-compact .section-head h2 {
  font-size: 1.15rem;
}

.section-carousel-compact .section-sub {
  display: none;
}

.section-carousel-compact .carousel {
  border-radius: var(--radius-lg);
}

.section-carousel-compact .carousel-slide {
  aspect-ratio: 3 / 2;
}

.section-carousel-compact .carousel-caption {
  padding: 12px 16px;
}

.section-carousel-compact .carousel-caption h3 {
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  margin-bottom: 4px;
}

.section-carousel-compact .carousel-caption p,
.section-carousel-compact .carousel-cta {
  display: none;
}

.section-carousel-compact .carousel-btn {
  width: 32px;
  height: 32px;
}

.section-carousel-compact .carousel-play {
  width: 30px;
  height: 30px;
  right: 52px;
  bottom: 10px;
}

.section-carousel-compact .carousel-dots {
  bottom: 8px;
  gap: 6px;
}

.section-carousel-compact .carousel-dot {
  width: 24px;
  height: 24px;
}

.section-carousel-compact .carousel-dot::before {
  width: 7px;
  height: 7px;
}

.section-carousel-compact .carousel-dot[aria-current="true"] {
  width: 28px;
}

.section-carousel-compact .carousel-dot[aria-current="true"]::before {
  width: 22px;
}

.carousel {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.carousel-viewport {
  overflow: hidden;
  position: relative;
}

.carousel-track {
  display: flex;
  transition: transform 0.55s var(--ease);
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 100%;
  min-width: 100%;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.carousel-media {
  display: block;
  position: absolute;
  inset: 0;
}

.carousel-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.carousel-slide[aria-current="true"] .carousel-media img {
  transform: scale(1.02);
}

.carousel-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 24, 39, 0.05) 0%, rgba(4, 24, 39, 0.72) 100%);
  pointer-events: none;
}

.carousel-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: clamp(18px, 4vw, 36px);
  color: #fff;
  max-width: 62ch;
}

.carousel-tag {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(244, 210, 109, 0.22);
  border: 1px solid rgba(244, 210, 109, 0.4);
  color: var(--gold-2);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.carousel-caption h3 {
  margin: 0 0 8px;
  font-size: clamp(1.2rem, 2.6vw, 1.85rem);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.carousel-caption h3 a {
  color: #fff;
}

.carousel-caption h3 a:hover {
  color: var(--gold-2);
}

.carousel-caption p {
  margin: 0 0 14px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.carousel-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  backdrop-filter: blur(6px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-cta:hover {
  background: rgba(244, 210, 109, 0.28);
  transform: translateX(2px);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(7, 24, 39, 0.55);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-btn:hover {
  background: rgba(244, 210, 109, 0.3);
  transform: translateY(-50%) scale(1.06);
}

.carousel-prev { left: 14px; }
.carousel-next { right: 14px; }

.carousel-play {
  position: absolute;
  right: 62px;
  bottom: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(7, 24, 39, 0.55);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-play:hover {
  background: rgba(244, 210, 109, 0.3);
  transform: scale(1.06);
}

.carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}

.carousel-dot {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: width 0.25s var(--ease);
}

.carousel-dot::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.25);
  transition: width 0.25s var(--ease), background 0.25s ease, border-color 0.25s ease;
}

.carousel-dot[aria-current="true"] {
  width: 36px;
}

.carousel-dot[aria-current="true"]::before {
  width: 26px;
  border-radius: var(--radius-pill);
  background: var(--gold-2);
  border-color: var(--gold-2);
}

/* ---------------------------------------------------------
   Motion / print
   --------------------------------------------------------- */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .ticker {
    animation: none;
    flex-wrap: wrap;
    width: auto;
  }

  .ticker-group[aria-hidden="true"] {
    display: none;
  }

  .ticker-viewport {
    mask-image: none;
    -webkit-mask-image: none;
    overflow-x: auto;
  }

  .carousel-track {
    transition: none;
  }

  .reveal-ready .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .topbar,
  .site-header,
  .ticker-wrap,
  .back-to-top,
  .toast,
  .footer,
  .share,
  .reading-progress {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .article-shell {
    padding-top: 0;
  }

  .article-cover {
    box-shadow: none;
  }
}

/* ---------------------------------------------------------
   Page hero — first text block ~50% smaller (inner pages only)
   --------------------------------------------------------- */
.page-hero {
  padding: 22px 0 20px;
}

.page-hero .container {
  max-width: 100%;
}

.page-hero .breadcrumb {
  margin-bottom: 9px;
  gap: 4px;
  font-size: 0.62rem;
}

.page-hero .kicker {
  margin-bottom: 4px;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
}

.page-hero .kicker::before {
  width: 12px;
  height: 1px;
}

.page-hero h1 {
  font-size: clamp(1.05rem, 2vw, 1.7rem);
  margin-bottom: 6px;
}

.page-hero .page-lead {
  font-size: 0.72rem;
  line-height: 1.5;
  max-width: 80ch;
}

.page-hero .page-meta {
  margin-top: 8px;
  padding: 3px 8px;
  font-size: 0.55rem;
}

/* ---------------------------------------------------------
   Breadcrumb-only hero: drop the duplicated kicker + title,
   plus the lead paragraph and the meta pill.
   The title stays in the DOM (visually hidden) for SEO/a11y.
   --------------------------------------------------------- */
.page-hero:has(.breadcrumb) {
  padding: 10px 0 9px;
}

.page-hero:has(.breadcrumb) .breadcrumb {
  margin-bottom: 0;
}

.page-hero:has(.breadcrumb) .kicker,
.page-hero:has(.breadcrumb) h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.page-hero:has(.breadcrumb) .kicker,
.page-hero:has(.breadcrumb) .page-lead,
.page-hero:has(.breadcrumb) .page-meta,
.page-hero:has(.breadcrumb) .container img {
  display: none;
}

/* Tighten the gap left by the removed archive heading */
.page-hero:has(.breadcrumb) + .section {
  padding-top: 28px;
}
