/* ===== tokens ===== */
/* Cointelegraph clone — design tokens
   Colour scale, type scale and radii mirror the reference design system. */

:root {
  /* ---- grey scale ---- */
  --ct-gray-50: oklch(98.8% .004 197.089);
  --ct-gray-100: oklch(96.6% .007 208.783);
  --ct-gray-200: oklch(92.6% .008 216.627);
  --ct-gray-300: oklch(87% .011 226);
  --ct-gray-400: oklch(71.1% .016 229.065);
  --ct-gray-500: oklch(55% .021 232.811);
  --ct-gray-600: oklch(44.6% .021 224.007);
  --ct-gray-700: oklch(35.1% .02 227.633);
  --ct-gray-800: oklch(27.3% .018 227.426);
  --ct-gray-900: oklch(19.9% .013 233.357);
  --ct-gray-950: oklch(13% .011 233.786);

  /* ---- brand amber ---- */
  --ct-orange-50: oklch(98.7% .021 95.277);
  --ct-orange-100: oklch(95.1% .069 93.888);
  --ct-orange-200: oklch(90.9% .117 91.879);
  --ct-orange-300: oklch(86.9% .148 87.387);
  --ct-orange-400: oklch(83% .16 82.673);
  --ct-orange-500: oklch(76.4% .16 76.462);
  --ct-orange-600: oklch(66.9% .143 72.136);
  --ct-orange-700: oklch(55.9% .122 69.521);
  --ct-orange-900: oklch(37.5% .08 66.182);

  --ct-red-400: oklch(70.4% .191 22.216);
  --ct-red-500: oklch(63.7% .237 25.331);
  --ct-red-600: oklch(57.7% .245 27.325);
  --ct-emerald-400: oklch(76.5% .177 163.223);
  --ct-emerald-500: oklch(69.6% .17 162.48);
  --ct-emerald-600: oklch(59.6% .145 163.225);

  --black: #000;
  --white: #fff;

  /* ---- semantic: light ---- */
  --fg-stronger: var(--black);
  --fg-strong: var(--ct-gray-900);
  --fg-default: var(--ct-gray-700);
  --fg-muted: var(--ct-gray-500);
  --bg-default: var(--white);
  --bg-3: var(--ct-gray-100);
  --border-default: var(--ct-gray-200);
  --border-strong: var(--ct-gray-300);
  --border-clear: #cdd6da26;
  --accent: var(--ct-orange-400);
  --accent-text: var(--ct-orange-600);
  --accent-red: var(--ct-red-600);
  --accent-red-strong: var(--ct-red-600);
  --accent-green: var(--ct-emerald-600);
  --shadow-xs: 0 1px 2px 0 #1e292e0f;
  --shadow-card: 0 1px 3px 0 #1e292e14, 0 1px 2px -1px #1e292e14;

  /* header */
  --header-bg: var(--ct-gray-950);
  --header-fg: var(--ct-gray-100);
  --header-top-height: 72px;
  --header-nav-height: 48px;

  /* ---- type ---- */
  /* Open Sans carries Latin/Cyrillic/Greek; the CJK, Arabic and Thai blocks
     fall through to whatever the platform already has installed. */
  --font-sans: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", "Hiragino Sans",
    "Yu Gothic UI", "Meiryo", "Malgun Gothic", "Noto Sans", "Noto Sans SC",
    "Noto Sans TC", "Noto Sans JP", "Noto Sans KR", "Noto Sans Thai",
    "Noto Sans Arabic", "Segoe UI Historic", Tahoma, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --text-xs: .75rem;      --lh-xs: 1.33333;
  --text-sm: .875rem;     --lh-sm: 1.42857;
  --text-base: 1rem;      --lh-base: 1.5;
  --text-lg: 1.125rem;    --lh-lg: 1.55556;
  --text-xl: 1.25rem;     --lh-xl: 1.4;
  --text-2xl: 1.5rem;     --lh-2xl: 1.33333;
  --text-3xl: 1.875rem;   --lh-3xl: 1.2;
  --text-4xl: 2.25rem;    --lh-4xl: 1.11111;

  --tracking-tight: -.025em;
  --tracking-lean: -.01em;

  /* ---- space / layout ---- */
  --container: 1280px;
  --gutter: 32px;
  --grid-gap: 40px;

  --radius-sm: .25rem;
  --radius-md: .375rem;
  --radius-lg: .5rem;
  --radius-xl: .75rem;

  --ease-out: cubic-bezier(0, 0, .2, 1);
}

[data-theme="dark"] {
  --fg-stronger: var(--white);
  --fg-strong: var(--ct-gray-100);
  --fg-default: var(--ct-gray-200);
  --fg-muted: var(--ct-gray-400);
  --bg-default: var(--ct-gray-950);
  --bg-3: var(--ct-gray-900);
  --border-default: var(--ct-gray-800);
  --border-strong: var(--ct-gray-700);
  --border-clear: #303d4326;
  --accent-text: var(--ct-orange-400);
  --accent-red: var(--ct-red-400);
  --accent-green: var(--ct-emerald-400);
  --shadow-card: 0 1px 3px 0 #0006, 0 1px 2px -1px #0006;
}


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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--lh-base);
  color: var(--fg-strong);
  background: var(--bg-default);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

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

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

::selection { background: var(--ct-orange-200); color: var(--ct-gray-900); }

/* ---------- layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: var(--ct-gray-950);
  padding: .75rem 1.25rem;
  font-weight: 600;
}
.skip-link:focus { inset-inline-start: 0; }

/* ---------- text utilities ---------- */
.clamp-2, .clamp-3, .clamp-4 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.clamp-2 { -webkit-line-clamp: 2; line-clamp: 2; }
.clamp-3 { -webkit-line-clamp: 3; line-clamp: 3; }
.clamp-4 { -webkit-line-clamp: 4; line-clamp: 4; }

.tnum { font-variant-numeric: tabular-nums; }

/* RTL: keep latin crypto tickers and numerals left-to-right */
[dir="rtl"] .ltr-inline {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}


/* ===== layout ===== */
/* ============ header ============ */
.site-header {
  background: var(--header-bg);
  color: var(--header-fg);
}

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

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.brand__logo {
  height: 46px;
  width: auto;
  flex-shrink: 0;
}

.header-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* language picker — anchored under the globe button */
.lang-wrap { position: relative; display: flex; }
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 60;
  width: 208px;
  max-height: 62vh;
  overflow-y: auto;
  padding: 6px;
  border-radius: var(--radius-lg);
  background: var(--bg-default);
  border: 1px solid var(--border-default);
  box-shadow: 0 16px 36px #10171b40;
}
.lang-menu[hidden] { display: none; }
.lang-menu button {
  display: block;
  width: 100%;
  text-align: start;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--fg-default);
  white-space: nowrap;
}
.lang-menu button:hover { background: var(--bg-3); }
.lang-menu button[aria-selected="true"] {
  background: var(--bg-3);
  color: var(--fg-strong);
  font-weight: 600;
}

.ecosystem-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding-inline: 14px;
  border-radius: var(--radius-lg);
  background: #ffffff14;
  color: var(--ct-gray-100);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: var(--tracking-lean);
  transition: background .15s var(--ease-out);
}
.ecosystem-btn:hover { background: #ffffff26; }

.icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  color: var(--ct-gray-300);
  transition: color .15s var(--ease-out), background .15s var(--ease-out);
}
.icon-btn:hover { color: var(--white); background: #ffffff14; }
.icon-btn svg { width: 17px; height: 17px; }

.lang-btn {
  display: inline-flex;
  align-items: center;
  width: auto;
  gap: 7px;
  padding-inline: 10px;
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
}

.header-divider {
  width: 1px;
  height: 20px;
  background: #ffffff26;
  margin-inline: 6px;
}

/* ============ main nav ============ */
.header-nav {
  background: var(--accent);
  color: var(--ct-gray-950);
}
.header-nav__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
/* No overflow clipping here: the dropdown panels are absolutely positioned
   children and a scroll container on this row would cut them off. */
.main-menu {
  display: flex;
  align-items: center;
  min-width: 0;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.nav-toggle:hover { background: #00000014; }
.nav-toggle svg { width: 22px; height: 22px; }
.menu-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  height: 48px;
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: var(--tracking-lean);
  white-space: nowrap;
  transition: background .15s var(--ease-out);
}
.menu-link:hover { background: #00000014; }
.menu-link__chev { width: 14px; height: 14px; opacity: .7; }
.menu-link[aria-expanded="true"] .menu-link__chev { transform: rotate(180deg); }

.nav-search {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.nav-search:hover { background: #00000014; }
.nav-search svg { width: 20px; height: 20px; }

/* nav dropdown */
.menu-item { position: relative; }
.menu-drop {
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  z-index: 40;
  min-width: 220px;
  padding: 8px;
  background: var(--bg-default);
  color: var(--fg-strong);
  border: 1px solid var(--border-default);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: 0 12px 32px #10171b26;
  display: none;
}
.menu-drop[data-open="true"] { display: block; }
.menu-drop a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
}
.menu-drop a:hover { background: var(--bg-3); }

/* The nine entries stop fitting well before the layout does, so below this
   width the bar collapses to a hamburger and the dropdowns become inline
   accordions — the same shape the reference site uses on a phone. */
@media (max-width: 1000px) {
  .nav-toggle { display: grid; }
  .main-menu {
    position: absolute;
    top: 100%;
    /* 0 spans the container's padding box, i.e. the full viewport width —
       the 16px inset comes from the menu links' own padding instead */
    inset-inline: 0;
    z-index: 50;
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: var(--accent);
    max-height: 72vh;
    overflow-y: auto;
    box-shadow: 0 18px 34px #10171b33;
  }
  .header-nav[data-open="true"] .main-menu { display: flex; }
  .header-nav[data-open="true"] .nav-toggle { background: #0000001f; }
  .menu-link {
    justify-content: space-between;
    width: 100%;
    height: auto;
    padding: 14px 16px;
    border-bottom: 1px solid #00000014;
  }
  .menu-item { position: static; }
  .menu-drop {
    position: static;
    display: none;
    min-width: 0;
    padding: 4px 8px 8px;
    background: #00000014;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .menu-drop[data-open="true"] { display: block; }
  .menu-drop a { color: var(--ct-gray-950); }
  .menu-drop a:hover { background: #ffffff33; }
}

/* ============ ticker ============ */
.ticker-bar {
  background: var(--bg-default);
  border-bottom: 1px solid var(--border-default);
  overflow: hidden;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 60s linear infinite;
}
.ticker-bar:hover .ticker-track { animation-play-state: paused; }
.ticker-bar[dir="rtl"] .ticker-track { animation-direction: reverse; }

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

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ticker-item:hover { background: var(--bg-3); }
.ticker-item__sym { font-size: var(--text-sm); font-weight: 700; color: var(--fg-stronger); }
.ticker-item__px { font-size: var(--text-sm); color: var(--fg-default); }
.ticker-item__chg {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
}
.ticker-item__chg svg { width: 12px; height: 12px; }
.is-up { color: var(--accent-green); }
.is-down { color: var(--accent-red); }
.is-up svg { transform: rotate(180deg); }

/* ============ ad slots ============ */
.ad-banner {
  position: relative;
  margin-block: 20px;
  min-height: 84px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 24px;
  background: linear-gradient(90deg, #04211a 0%, #07271f 40%, #0a1f1a 100%);
  color: var(--white);
}
.ad-banner--flat {
  background: linear-gradient(90deg, #0a1f1a 0%, #123 100%);
}
.ad-banner__text {
  flex: 1;
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.35;
}
.ad-banner__cta { flex-shrink: 0; }
.ad-banner__logo {
  flex-shrink: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: .06em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ad-badge {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: #ffffffa6;
  z-index: 2;
}
.ad-slot {
  border-radius: var(--radius-lg);
  background: var(--bg-3);
  border: 1px dashed var(--border-strong);
  display: grid;
  place-items: center;
  color: var(--fg-muted);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ============ hero 3-column ============ */
.hero-grid {
  display: grid;
  grid-template-columns: .95fr 2fr 1fr;
  gap: var(--grid-gap);
  align-items: start;
  padding-block: 6px 28px;
}
.hero-col { min-width: 0; }
.hero-col--main {
  border-inline: 1px solid var(--border-strong);
  padding-inline: var(--grid-gap);
  margin-inline: calc(var(--grid-gap) * -1);
}

/* live list */
.live-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.live-head h2 {
  font-size: var(--text-xl);
  line-height: var(--lh-xl);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  color: var(--fg-strong);
}
.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--ct-red-500);
  text-transform: uppercase;
}
.live-dot::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--ct-red-500);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--ct-red-500) 22%, transparent);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  50% { box-shadow: 0 0 0 7px color-mix(in oklab, var(--ct-red-500) 6%, transparent); }
}

.live-list { display: flex; flex-direction: column; }
.live-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding-block: 13px;
}
.live-item + .live-item { border-top: 1px solid var(--border-clear); }
.live-item__title {
  font-size: var(--text-base);
  line-height: 1.375;
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  color: var(--fg-strong);
  text-wrap: pretty;
}
.live-item:hover .live-item__title { text-decoration: underline; }
.live-item__time {
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1;
  color: var(--fg-muted);
  white-space: nowrap;
}
.live-item__time.is-fresh { color: var(--accent-red-strong); }

/* most read */
.mostread-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.mostread-head h2 {
  font-size: var(--text-xl);
  line-height: var(--lh-xl);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
}
.mostread-head span { font-size: var(--text-sm); color: var(--fg-muted); }

.mr-list { display: flex; flex-direction: column; }
.mr-item {
  padding-block: 14px;
  border-bottom: 1px solid var(--border-clear);
}
.mr-item:first-child { border-top: 1px solid var(--border-clear); }
.mr-item__title {
  font-size: var(--text-base);
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  color: var(--fg-strong);
  text-wrap: pretty;
}
.mr-item:hover .mr-item__title { text-decoration: underline; }
.mr-item__author {
  margin-top: 7px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--fg-muted);
}

/* ============ category sections ============ */
.section {
  padding-block: 26px;
  border-top: 1px solid var(--border-default);
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-strong);
}
.section-head h2 {
  font-size: var(--text-xl);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  color: var(--fg-strong);
  display: flex;
  align-items: center;
  gap: 6px;
}
.section-head h2 svg { width: 16px; height: 16px; opacity: .45; }
.section-head:hover h2 svg { transform: translateX(3px); }
.section-head h2 svg { transition: transform .18s var(--ease-out); }

.section-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--grid-gap);
  align-items: start;
}
/* two-by-two card block: under the lead story and inside every section */
.cards-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--grid-gap);
}
.cards-2x2 .article-card {
  padding-block: 18px;
  border-top: 1px solid var(--border-clear);
}
.cards-2x2 .article-card:nth-child(-n+2) { padding-top: 0; border-top: 0; }
.cards-2x2 .article-card:nth-child(odd) { padding-inline-end: var(--grid-gap); }
.cards-2x2 .article-card:nth-child(even) {
  margin-inline-start: calc(var(--grid-gap) * -1);
  padding-inline-start: var(--grid-gap);
  border-inline-start: 1px solid var(--border-clear);
}
.section-cards { grid-column: 2 / 4; }
.hero-col--main .cards-2x2 { margin-top: 26px; }

.article-card__title {
  font-size: var(--text-base);
  line-height: 1.375;
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  color: var(--fg-strong);
  text-wrap: pretty;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
.article-card:hover .article-card__title { text-decoration: underline; }
.article-card__meta {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  flex-direction: row-reverse;
  flex-wrap: wrap-reverse;
  gap: 4px 8px;
  margin-top: 8px;
}
.article-card__author {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--fg-default);
  min-width: 0;
}
.article-card__date {
  font-size: var(--text-xs);
  color: var(--fg-muted);
  flex-shrink: 0;
}

/* ============ footer ============ */
.site-footer {
  background: var(--ct-gray-950);
  color: var(--ct-gray-200);
  margin-top: 40px;
  padding-bottom: 24px;
}
.footer-top {
  display: flex;
  gap: 64px;
  padding-block: 40px 28px;
  flex-wrap: wrap;
}
.footer-nav {
  display: flex;
  flex: 1 1 auto;
  justify-content: space-between;
  gap: 24px;
  min-width: 0;
}
.footer-group { display: flex; flex-direction: column; gap: 8px; flex: 1 1 0; min-width: 0; }
.footer-group__title {
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  color: var(--ct-gray-200);
  padding-block: 6px;
}
.footer-group a {
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-tight);
  color: var(--ct-gray-400);
  padding-block: 4px;
  transition: color .15s var(--ease-out);
}
.footer-group a:hover { color: var(--accent); }

.footer-aside { display: flex; flex-direction: column; gap: 18px; }
.store-badges { display: flex; gap: 10px; }
.store-badges a {
  display: block;
  border-radius: 6px;
  overflow: hidden;
  transition: opacity .15s var(--ease-out);
}
.store-badges a:hover { opacity: .8; }
.store-badges svg { height: 40px; width: auto; }

.footer-social { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.footer-social a { color: var(--ct-gray-300); }
.footer-social a:hover { color: var(--accent); }
.footer-social svg { width: 19px; height: 19px; }

.footer-bottom {
  border-top: 1px solid var(--ct-gray-800);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-legal {
  font-size: var(--text-xs);
  line-height: 1.6;
  color: var(--ct-gray-400);
}
.footer-legal a { color: var(--ct-gray-300); text-decoration: underline; }
.footer-copy {
  font-size: var(--text-xs);
  color: var(--ct-gray-500);
  margin-top: 4px;
}

/* ============ newsletter toast ============ */
.newsletter-toast {
  position: fixed;
  inset-block-end: 16px;
  inset-inline-end: 16px;
  z-index: 60;
  width: 300px;
  padding: 14px;
  border-radius: var(--radius-xl);
  background: var(--bg-default);
  border: 1px solid var(--border-default);
  box-shadow: 0 16px 40px #10171b2e;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.newsletter-toast[hidden] { display: none; }
.newsletter-toast__top { display: flex; gap: 12px; align-items: flex-start; }
.newsletter-toast__badge {
  flex-shrink: 0;
  width: 62px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--accent);
}
.newsletter-toast__text { font-size: var(--text-sm); font-weight: 600; line-height: 1.35; }
.newsletter-toast__close {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  width: 22px; height: 22px;
  display: grid;
  place-items: center;
  color: var(--fg-muted);
  border-radius: var(--radius-sm);
}
.newsletter-toast__close:hover { background: var(--bg-3); }
.newsletter-toast { position: fixed; }
.newsletter-toast__close svg { width: 14px; height: 14px; }

/* ============ breadcrumb / page headings ============ */
.page-head { padding-block: 28px 6px; }
.page-head h1 {
  font-size: var(--text-3xl);
  line-height: var(--lh-3xl);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
}
.page-head p { margin-top: 8px; color: var(--fg-default); font-size: var(--text-base); }
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--fg-muted);
  padding-block: 18px 0;
}
.breadcrumb a:hover { color: var(--accent-text); text-decoration: underline; }
.breadcrumb span[aria-current] { color: var(--fg-strong); font-weight: 600; }

/* ============ responsive ============ */
@media (max-width: 1080px) {
  :root { --gutter: 24px; --grid-gap: 28px; }
  .hero-grid { grid-template-columns: 1fr 1.9fr; }
  .hero-col--aside-right { grid-column: 1 / 3; }
  .hero-col--main { border-inline: 0; padding-inline: 0; margin-inline: 0; }
  .section-grid { grid-template-columns: 1.6fr 1fr 1fr; }
  .footer-top { flex-direction: column; gap: 28px; }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; --grid-gap: 20px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-col--aside-right { grid-column: auto; }
  .section-grid { grid-template-columns: 1fr; gap: 20px; }
  .section-cards { grid-column: auto; }
  .cards-2x2 { grid-template-columns: 1fr; }
  .cards-2x2 .article-card:nth-child(odd) { padding-inline-end: 0; }
  .cards-2x2 .article-card:nth-child(even) {
    padding-inline-start: 0;
    margin-inline-start: 0;
    border-inline-start: 0;
  }
  .cards-2x2 .article-card { padding-block: 16px; }
  .cards-2x2 .article-card + .article-card { border-top: 1px solid var(--border-clear); }
  .hero-col--main .cards-2x2 { margin-top: 20px; }
  .ad-banner { flex-direction: column; align-items: flex-start; gap: 14px; text-align: start; }
  .page-head h1 { font-size: var(--text-2xl); }
  .newsletter-toast { inset-inline: 12px; width: auto; }
  .menu-link { padding-inline: 12px; font-size: var(--text-sm); }
}

/* The top bar is the only row that cannot wrap, so on narrow screens the
   social links and the Ecosystem label step aside; language and theme stay. */
@media (max-width: 900px) {
  /* five columns cannot hold their longest labels on a phone — stack them
     two-up, which is what the reference footer does as well */
  .footer-nav { flex-wrap: wrap; justify-content: flex-start; row-gap: 20px; }
  .footer-group { flex: 0 0 calc(50% - 12px); }
  .footer-group a, .footer-group__title { overflow-wrap: break-word; }
  .header-actions a.icon-btn { display: none; }
  .header-divider { display: none; }
  .ecosystem-btn span { display: none; }
  .ecosystem-btn { padding-inline: 10px; }
  .brand__logo { height: 38px; }
}

@media (max-width: 560px) {
  .ecosystem-btn { display: none; }
  .brand__logo { height: 32px; }
}


/* ===== components ===== */
/* ============ buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding-inline: 12px;
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  line-height: 1;
  font-weight: 600;
  letter-spacing: var(--tracking-lean);
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s var(--ease-out), color .15s var(--ease-out),
              border-color .15s var(--ease-out), transform .1s var(--ease-out);
}
.btn:active { transform: scale(.98); }
.btn__icon { width: 15px; height: 15px; }

.btn--outline {
  border: 1px solid var(--border-clear);
  background: var(--bg-default);
  color: var(--fg-default);
  box-shadow: var(--shadow-xs);
}
.btn--outline:hover { background: var(--bg-3); color: var(--fg-strong); }

.btn--primary {
  background: var(--ct-emerald-600);
  color: var(--white);
}
.btn--primary:hover { background: var(--ct-emerald-500); }

.btn--solid {
  background: var(--ct-gray-950);
  color: var(--white);
}
.btn--solid:hover { background: var(--ct-gray-800); }

.btn--full { width: 100%; }

/* ============ fancy (overlay) card ============ */
.card-fancy {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(to bottom, #000, var(--ct-gray-900));
  color: var(--ct-gray-100);
  min-height: 320px;
}
.card-fancy__media {
  position: relative;
  aspect-ratio: 5 / 3;
  margin-bottom: -4rem;
}
.card-fancy__media img { width: 100%; height: 100%; object-fit: cover; }
.card-fancy__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 38%, #000000b3 78%, #000 100%);
}
.card-fancy__body {
  position: relative;
  z-index: 1;
  padding: 0 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: -4rem;
}
.card-fancy__title {
  font-size: var(--text-xl);
  line-height: 1.5rem;
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  color: var(--ct-gray-100);
  text-wrap: pretty;
}
.card-fancy:hover .card-fancy__title { text-decoration: underline; }
.card-fancy__lead {
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--ct-gray-300);
  text-wrap: pretty;
}
.card-fancy__meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.card-fancy__author { font-size: var(--text-xs); font-weight: 700; color: var(--white); }
.card-fancy__date { font-size: var(--text-xs); color: var(--ct-gray-400); }

@media (min-width: 761px) {
  .card-fancy { min-height: 380px; }
  .card-fancy__media { margin-bottom: -6rem; }
  .card-fancy__body { margin-top: -6rem; padding: 0 1rem 1.25rem; }
  .card-fancy__title { font-size: var(--text-2xl); line-height: 1.875rem; }
  .card-fancy__lead { font-size: var(--text-sm); display: block; }
}
@media (max-width: 760px) {
  .card-fancy__lead { display: none; }
}

/* ============ thumb card (image left) ============ */
.card-thumb {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 12px;
  align-items: start;
  padding-block: 14px;
}
.card-thumb + .card-thumb { border-top: 1px solid var(--border-clear); }
.card-thumb__img {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--bg-3);
}
.card-thumb__img img { width: 100%; height: 100%; object-fit: cover; }

/* ============ press releases ============ */
.press {
  margin-top: 28px;
  padding: 16px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
}
.press__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.press__head h3 {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.press__head h3:hover { color: var(--fg-strong); }
.press__head h3 svg { width: 14px; height: 14px; opacity: .6; }
.press__tabs { display: flex; align-items: center; gap: 10px; }
.press__tab {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--fg-muted);
  letter-spacing: var(--tracking-lean);
}
.press__tab[aria-selected="true"] { color: var(--accent-text); }
.press__dots { display: flex; gap: 4px; }
.press__dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: background .15s var(--ease-out);
}
.press__dot[aria-selected="true"] { background: var(--accent-text); }

.press__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px var(--grid-gap);
}
.press__item { min-width: 0; }
.press__item + .press__item { position: relative; }
.press__item-title {
  font-size: var(--text-sm);
  line-height: 1.25;
  font-weight: 600;
  color: var(--fg-strong);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  margin-bottom: 6px;
}
.press__item:hover .press__item-title { text-decoration: underline; }
.press__item-meta { font-size: var(--text-xs); font-weight: 500; color: var(--fg-default); }

/* ============ article page ============ */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: var(--grid-gap);
  align-items: start;
  padding-block: 8px 40px;
}
.article-body { min-width: 0; }
.article-title {
  font-size: var(--text-3xl);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  text-wrap: pretty;
}
.article-standfirst {
  margin-top: 12px;
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--fg-default);
  text-wrap: pretty;
}
.article-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-default);
}
.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--ct-gray-900);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: var(--text-sm);
  font-weight: 700;
  flex-shrink: 0;
}
.article-byline__name { font-size: var(--text-sm); font-weight: 700; }
.article-byline__date { font-size: var(--text-xs); color: var(--fg-muted); }
.article-hero {
  margin-top: 20px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-3);
}
.article-hero img { width: 100%; height: 100%; object-fit: cover; }
.article-figure-cap {
  margin-top: 8px;
  font-size: var(--text-xs);
  color: var(--fg-muted);
}

.prose { margin-top: 22px; }
.prose > * + * { margin-top: 18px; }
.prose p {
  font-size: var(--text-lg);
  line-height: 1.65;
  color: var(--fg-strong);
  text-wrap: pretty;
}
.prose h2 {
  font-size: var(--text-2xl);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  margin-top: 34px;
}
.prose blockquote {
  border-inline-start: 3px solid var(--accent);
  padding-inline-start: 18px;
  font-size: var(--text-lg);
  font-style: normal;
  font-weight: 600;
  color: var(--fg-strong);
}
.prose ul { display: flex; flex-direction: column; gap: 8px; }
.prose li {
  position: relative;
  padding-inline-start: 20px;
  font-size: var(--text-lg);
  line-height: 1.6;
}
.prose li::before {
  content: "";
  position: absolute;
  inset-inline-start: 4px;
  top: .68em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.prose a { color: var(--accent-text); text-decoration: underline; }

.disclaimer {
  margin-top: 32px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-3);
  border: 1px solid var(--border-default);
  font-size: var(--text-xs);
  line-height: 1.6;
  color: var(--fg-default);
}

.article-aside { display: flex; flex-direction: column; gap: 22px; }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-default);
  color: var(--fg-default);
  transition: background .15s var(--ease-out), color .15s var(--ease-out);
}
.share-btn:hover { background: var(--bg-3); color: var(--fg-strong); }
.share-btn svg { width: 16px; height: 16px; }

.rel-head {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-strong);
  margin-bottom: 4px;
}
.rel-list { display: flex; flex-direction: column; }
.rel-item { padding-block: 12px; border-bottom: 1px solid var(--border-clear); }
.rel-item__title {
  font-size: var(--text-sm);
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  color: var(--fg-strong);
}
.rel-item:hover .rel-item__title { text-decoration: underline; }
.rel-item__meta { margin-top: 6px; font-size: var(--text-xs); color: var(--fg-muted); }

@media (max-width: 1080px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-title { font-size: var(--text-2xl); }
  .prose p, .prose li { font-size: var(--text-base); }
}

/* ============ category listing ============ */
.listing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px var(--grid-gap);
  padding-block: 24px 8px;
}
.listing--top { padding-top: 6px; padding-bottom: 30px; }
.listing--top .card-cover { grid-column: span 2; }
.listing--top .card-cover__img { aspect-ratio: 2 / 1; }

.card-cover { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card-cover__img {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-3);
}
.card-cover__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease-out); }
.card-cover:hover .card-cover__img img { transform: scale(1.03); }
.card-cover__title {
  font-size: var(--text-lg);
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  color: var(--fg-strong);
  text-wrap: pretty;
}
.card-cover:hover .card-cover__title { text-decoration: underline; }
.card-cover__meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: var(--fg-muted);
}
.card-cover__meta b { font-weight: 500; color: var(--fg-default); }

@media (max-width: 1080px) {
  .listing { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .listing { grid-template-columns: 1fr; }
}

/* ============ ecosystem dropdown (sits on the dark header) ============ */
.menu-drop--dark {
  inset-inline-start: auto;
  inset-inline-end: 0;
  min-width: 260px;
  margin-top: 6px;
  border-radius: var(--radius-lg);
  border-color: var(--ct-gray-800);
}
.header-actions .menu-item { position: relative; }

/* ============ search overlay ============ */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #10171bcc;
  backdrop-filter: blur(3px);
  display: flex;
  justify-content: center;
  padding: 88px 16px 32px;
  overflow-y: auto;
}
.search-overlay[hidden] { display: none; }

.search-box {
  width: 100%;
  max-width: 720px;
  align-self: flex-start;
  background: var(--bg-default);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 64px #10171b59;
  padding: 18px;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-inline: 12px;
  height: 48px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  color: var(--fg-muted);
}
.search-field:focus-within { border-color: var(--accent); }
.search-field svg { width: 20px; height: 20px; flex-shrink: 0; }
.search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font-size: var(--text-lg);
  color: var(--fg-strong);
}
.search-close {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: var(--radius-md);
  color: var(--fg-muted);
  flex-shrink: 0;
}
.search-close:hover { background: var(--bg-3); color: var(--fg-strong); }
.search-close svg { width: 16px; height: 16px; }

.search-hint, .search-empty {
  margin-top: 14px;
  font-size: var(--text-sm);
  color: var(--fg-muted);
}
.search-results { margin-top: 10px; display: flex; flex-direction: column; }
.search-hit {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-lg);
}
.search-hit:hover { background: var(--bg-3); }
.search-hit img {
  width: 78px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--bg-3);
}
.search-hit b {
  display: block;
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: var(--tracking-tight);
  color: var(--fg-strong);
}
.search-hit i {
  display: block;
  margin-top: 5px;
  font-size: var(--text-xs);
  font-style: normal;
  color: var(--fg-muted);
}

/* ============ newsletter form ============ */
.newsletter-form { display: flex; flex-direction: column; gap: 8px; }
.newsletter-form input {
  height: 38px;
  padding-inline: 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--bg-default);
  font-size: var(--text-sm);
  color: var(--fg-strong);
  outline: 0;
}
.newsletter-form input:focus { border-color: var(--accent); }
.newsletter-form input::placeholder { color: var(--fg-muted); }
.newsletter-note { font-size: var(--text-xs); line-height: 1.4; min-height: 1em; }
.newsletter-note.is-ok { color: var(--accent-green); }
.newsletter-note.is-bad { color: var(--accent-red); }

@media (max-width: 560px) {
  .search-overlay { padding-top: 64px; }
  .search-hit { grid-template-columns: 56px 1fr; }
  .search-hit img { width: 56px; }
}

/* ============ empty / loading ============ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-3) 25%, var(--border-default) 37%, var(--bg-3) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--radius-md);
}
@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}
