@import url("https://fonts.googleapis.com/css2?family=Onest:wght@400;500;600;700&display=swap");

/* Generated from design/tokens.json by tools/build_css.py. Do not edit. */
:root {
  --bg: #ffffff;
  --surface: #f5f5f6;
  --surface-2: #ececee;
  --line: #e4e4e7;
  --line-control: #8a8a92;
  --ink: #0b0b0c;
  --ink-2: #45454b;
  --muted: #6b6b73;
  --accent: #2b6aa3;
  --on-accent: #ffffff;
  --brand-blue: #326fa5;
  --live: #c8281d;
  --success: #18763a;
  --shadow-pop: 0 8px 24px rgba(11,11,12,0.12), 0 1px 2px rgba(11,11,12,0.08);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 999px;
  --page-max: 1200px;
  --measure: 680px;
  --col-side: 300px;
  --thumb-feed: 72px;
  --header-h: 56px;
  --font-sans: Onest, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0c;
    --surface: #161618;
    --surface-2: #202023;
    --line: #26262a;
    --line-control: #6a6a72;
    --ink: #f2f2f3;
    --ink-2: #c5c5ca;
    --muted: #9b9ba3;
    --accent: #86b6e3;
    --on-accent: #0b0b0c;
    --live: #ff7a6e;
    --success: #5cc77c;
    --shadow-pop: 0 8px 24px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0b0c;
  --surface: #161618;
  --surface-2: #202023;
  --line: #26262a;
  --line-control: #6a6a72;
  --ink: #f2f2f3;
  --ink-2: #c5c5ca;
  --muted: #9b9ba3;
  --accent: #86b6e3;
  --on-accent: #0b0b0c;
  --live: #ff7a6e;
  --success: #5cc77c;
  --shadow-pop: 0 8px 24px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
  color-scheme: dark;
}

/* components.css */

/* Tedroid components. Colours, spacing and radii come from tokens.css; nothing here declares a value tokens.json owns. */

:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --dur-fast: 150ms;
}

.td-root, .td-root * { box-sizing: border-box; }
.td-root {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
.td-root a { color: inherit; text-decoration: none; }
.td-root :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }

.td-meta { font-size: 13px; line-height: 16px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.td-label { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* Header. Phones: [menu] [logo] ........ [search] [theme] [sponsor]. Desktop: [logo] [sections] ... [search] [theme] [sponsor]. */
.td-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.td-header__inner { max-width: var(--page-max); margin: 0 auto; height: var(--header-h); padding: 0 var(--space-2) 0 var(--space-1); display: flex; align-items: center; gap: var(--space-1); }
.td-header__brand { display: flex; align-items: center; flex: none; padding: 0 var(--space-2); }
/* Logo: mark + word. Monochrome at rest (ink face, paper eyes); Tedroid blue only on hover.
   The word is live Onest text so it stays crisp and follows the theme colour. */
.td-logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.td-logo__mark { display: block; flex: none; }
.td-logo__face { fill: var(--ink); }
.td-logo__color { opacity: 0; transition: opacity .3s ease; }
.td-logo__eye { fill: var(--bg); transform-box: fill-box; transform-origin: center; transition: fill .3s ease; }
.td-logo__eyes { transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.td-logo__word { position: relative; top: .05em; font: 700 20px/1 var(--font-sans); letter-spacing: -.03em; } /* optical centring: lowercase-heavy word, no descenders */
a:hover > .td-logo .td-logo__color, .td-logo:hover .td-logo__color { opacity: 1; }
a:hover > .td-logo .td-logo__eye, .td-logo:hover .td-logo__eye { fill: #efefef; }
.td-logo[data-blink] .td-logo__eye { animation: td-blink .2s ease-in-out; }
@keyframes td-blink { 50% { transform: scaleY(.12); } }
@media (prefers-reduced-motion: reduce) { .td-logo__color, .td-logo__eye, .td-logo__eyes { transition: none; } }
.td-header__nav { display: none; gap: var(--space-5); flex: 1; min-width: 0; margin-left: var(--space-5); }
.td-header__nav a { position: relative; font-size: 15px; line-height: var(--header-h); font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.td-header__nav a[aria-current="page"] { color: var(--ink); }
.td-header__nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); }
.td-header__actions { display: flex; align-items: center; gap: 0; flex: none; margin-left: auto; }
.td-header__sponsor { margin-left: var(--space-1); flex: none; }
.td-icon-btn { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: var(--radius-full); border: 0; background: transparent; color: var(--ink);
  cursor: pointer; transition: background-color var(--dur-fast) ease, transform 120ms var(--ease-out); touch-action: manipulation; }
.td-icon-btn:active { transform: scale(.94); }
.td-icon-btn svg { width: 20px; height: 20px; }
.td-theme-icon--sun { display: none; }
[data-theme="dark"] .td-theme-icon--sun { display: block; }
[data-theme="dark"] .td-theme-icon--moon { display: none; }
@media (min-width: 1024px) {
  .td-header__inner { padding: 0 var(--space-4); gap: var(--space-2); }
  .td-header__brand { padding: 0; }
  .td-header__nav { display: flex; }
  .td-header__menu-btn { display: none; }
}

/* Search sheet: opens under the header on every page, live results while typing. */
.td-search-sheet { position: fixed; left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + var(--header-h)); z-index: 11; background: var(--bg);
  border-bottom: 1px solid var(--line); box-shadow: var(--shadow-pop); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; transform: translateY(-8px); visibility: hidden; transition: opacity 120ms ease, transform 120ms ease, visibility 0s linear 120ms; }
.td-search-sheet[data-open] { opacity: 1; transform: none; visibility: visible; transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
.td-search-sheet__inner { max-width: var(--measure); margin: 0 auto; padding: var(--space-4); }
.td-search-sheet form { display: flex; gap: var(--space-2); }
.td-search-sheet input { flex: 1; min-width: 0; height: 48px; padding: 0 var(--space-4); font: 400 17px/24px var(--font-sans); color: var(--ink); background: var(--surface);
  border: 1px solid transparent; border-radius: var(--radius-full); }
.td-search-sheet input:focus { outline: 2px solid var(--accent); outline-offset: 0; background: var(--bg); }
.td-search-results { margin-top: var(--space-3); }
.td-search-results .td-feed-item:last-child { border-bottom: 0; }
.td-search-hint { padding: var(--space-3) 0; color: var(--muted); font-size: 14px; }
.td-search-all { display: block; margin-top: var(--space-2); padding: var(--space-3) 0; font-weight: 600; color: var(--accent); }
.td-backdrop { position: fixed; inset: 0; z-index: 8; background: rgba(0,0,0,.32); opacity: 0; visibility: hidden; transition: opacity 120ms ease, visibility 0s linear 120ms; }
.td-backdrop[data-open] { opacity: 1; visibility: visible; transition: opacity 200ms var(--ease-out); }

/* Mobile section menu: opens under the header. Enter 200ms ease-out, exit 120ms. */
.td-menu { position: fixed; left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + var(--header-h)); bottom: 0; z-index: 9; background: var(--bg);
  overflow-y: auto; overscroll-behavior: contain; padding: var(--space-3) var(--space-4) var(--space-7);
  opacity: 0; transform: translateY(-8px); visibility: hidden; transition: opacity 120ms ease, transform 120ms ease, visibility 0s linear 120ms; }
.td-menu[data-open] { opacity: 1; transform: none; visibility: visible; transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
.td-menu a:not(.td-social__btn) { display: block; padding: var(--space-3) 0; border-bottom: 1px solid var(--line); font-size: 18px; line-height: 24px; font-weight: 600; color: var(--ink); }
.td-menu a.td-menu__sub { padding-left: var(--space-4); font-size: 16px; font-weight: 500; color: var(--ink-2); }
.td-menu__pages { margin-top: var(--space-5); display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.td-menu .td-menu__pages a { border: 0; padding: 0; font-size: 14px; font-weight: 500; color: var(--muted); }
@media (min-width: 1024px) { .td-menu { display: none; } }

/* Feed */
.td-day { margin: var(--space-6) 0 var(--space-2); }
.td-day:first-child { margin-top: 0; }
.td-feed-item { display: flex; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
.td-feed-item__thumb { width: var(--thumb-feed); height: var(--thumb-feed); flex: none; border-radius: var(--radius-sm); object-fit: cover; background: var(--surface); }
.td-feed-item__body { min-width: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.td-feed-item__title { font-size: 17px; line-height: 23px; font-weight: 500; color: var(--ink); text-wrap: pretty; overflow-wrap: anywhere; }
.td-feed-item--article .td-feed-item__title { font-weight: 600; }
@media (min-width: 1024px) { .td-feed-item__thumb { width: 88px; height: 88px; } }

/* Günün seçilmişləri */
.td-picks { background: var(--surface); border-radius: var(--radius-md); padding: var(--space-4); }
.td-picks__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--space-2); }
.td-picks ol { list-style: none; margin: 0; padding: 0; counter-reset: pick; }
.td-picks li { counter-increment: pick; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--space-2); padding: var(--space-3) 0; border-top: 1px solid var(--line); }
.td-picks li:first-child { border-top: 0; }
.td-picks li::before { content: counter(pick); font-size: 22px; line-height: 24px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.td-picks__title { font-size: 17px; line-height: 23px; font-weight: 600; overflow-wrap: anywhere; }
/* Phones: same five picks, titles only, so the feed starts on the first screen. */
@media (max-width: 1023px) {
  .td-picks { padding: var(--space-3) var(--space-4); }
  .td-picks li { grid-template-columns: 20px minmax(0, 1fr); padding: var(--space-2) 0; }
  .td-picks li::before { font-size: 17px; line-height: 22px; }
  .td-picks__title { font-size: 16px; line-height: 22px; }
  .td-picks .td-meta, .td-picks br { display: none; }
}

/* Məqalələr card */
.td-card { display: flex; flex-direction: column; gap: var(--space-2); }
.td-card__img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-md); background: var(--surface); }
.td-card__title { font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -.01em; text-wrap: balance; overflow-wrap: anywhere; }
.td-card--compact .td-card__title { font-size: 18px; line-height: 24px; }

/* Article */
.td-article { max-width: var(--measure); margin: 0 auto; }
.td-crumbs { display: flex; gap: var(--space-2); }
.td-crumbs a { color: var(--muted); }
.td-article__title { margin: var(--space-3) 0; font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -.015em; text-wrap: pretty; overflow-wrap: anywhere; }
@media (min-width: 768px) { .td-article__title { font-size: 40px; line-height: 44px; letter-spacing: -.02em; } }
.td-article__lead { margin: 0 0 var(--space-4); font-size: 20px; line-height: 30px; color: var(--ink-2); }
.td-article__meta { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); padding-bottom: var(--space-4); border-bottom: 1px solid var(--line); }
.td-prose { font-size: 17px; line-height: 28px; overflow-wrap: break-word; }
@media (min-width: 768px) { .td-prose { font-size: 18px; line-height: 30px; } }
.td-prose p { margin: 0 0 var(--space-4); }
.td-prose h2 { margin: var(--space-6) 0 var(--space-3); font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -.01em; }
.td-prose h3 { margin: var(--space-5) 0 var(--space-2); font-size: 18px; line-height: 24px; font-weight: 600; }
.td-prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.td-prose ul, .td-prose ol { padding-left: var(--space-5); margin: 0 0 var(--space-4); }
.td-prose blockquote { margin: var(--space-5) 0; padding-left: var(--space-4); border-left: 2px solid var(--ink); }

/* Article blocks */
.td-media { margin: var(--space-5) 0; }
.td-media img { display: block; width: 100%; height: auto; border-radius: var(--radius-md); background: var(--surface); }
.td-media figcaption { margin-top: var(--space-2); font-size: 14px; line-height: 20px; color: var(--ink-2); }
.td-callout { margin: var(--space-5) 0; padding: var(--space-4); background: var(--surface); border-radius: var(--radius-md); font-weight: 500; }
.td-post-link { display: flex; gap: var(--space-3); align-items: center; margin: var(--space-5) 0; padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-md); }
.td-post-link img { width: 96px; height: 64px; flex: none; object-fit: cover; border-radius: var(--radius-sm); }
.td-post-link__title { font-size: 16px; line-height: 22px; font-weight: 600; min-width: 0; }
.td-prose a.td-video__poster { text-decoration: none; }

/* Media Blocks (<media-block>) & Article Figures */
.td-article figure,
.td-prose figure,
.td-prose figure.media-block,
.media-block {
    margin: var(--space-5) 0 !important;
    margin-inline: 0 !important;
    padding-inline: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block;
    box-sizing: border-box;
}

.td-prose figure picture,
.td-article figure picture,
.media-block picture {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0;
    padding: 0;
}

.td-article figure img,
.td-prose figure img,
.td-prose picture img,
.td-prose img,
.media-block img,
.media-img {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    border-radius: var(--radius-md);
    background: var(--surface);
    box-sizing: border-box;
}

.td-prose figure figcaption,
.td-article figure figcaption,
.media-block figcaption {
    margin-top: var(--space-2);
    font-size: 14px;
    line-height: 20px;
    color: var(--ink-2);
    text-align: center;
}

.media-block--video { width: 100%; }
.media-embed-wrapper,
.media-video-wrapper { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-md); overflow: hidden; background: #000; }
.media-embed-wrapper iframe,
.media-video-wrapper video,
.media-block--video iframe,
.media-block--video video,
.media-block iframe,
.media-block video { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; }

/* YouTube: poster with a play button; the player (youtube-nocookie) replaces it on click. */
.td-video { margin: var(--space-5) 0; }
.td-video__poster, .td-video iframe { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-md); overflow: hidden; background: #000; }
.td-video .td-video__poster img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.td-video__poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.35), transparent 40%); }
.td-video__play { position: absolute; z-index: 1; left: 50%; top: 50%; display: grid; place-items: center; width: 72px; height: 72px; margin: -36px 0 0 -36px;
  border-radius: 50%; background: rgba(11, 11, 12, .72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; transition: transform .2s ease, background .2s ease; }
.td-video__play svg { width: 30px; height: 30px; margin-left: 4px; }
.td-video__brand { position: absolute; z-index: 1; left: var(--space-3); bottom: var(--space-3); font-size: 12px; font-weight: 600; letter-spacing: .02em; color: rgba(255,255,255,.9); }
.td-video__poster:hover .td-video__play, .td-video__poster:focus-visible .td-video__play { transform: scale(1.08); background: #0b0b0c; }
.td-video__poster:hover img { transform: scale(1.02); }
@media (max-width: 520px) { .td-video__play { width: 60px; height: 60px; margin: -30px 0 0 -30px; } .td-video__play svg { width: 26px; height: 26px; } }
.td-video__brand { display: inline-flex; align-items: center; gap: 6px; }
.td-video__brand svg { width: 14px; height: 14px; }
/* TikTok, Reels and Shorts keep their phone shape instead of being letterboxed into 16:9. */
.td-video--vertical { width: min(100%, 360px); margin-inline: auto; }
.td-video--vertical .td-video__poster, .td-video--vertical iframe { aspect-ratio: 9 / 16; border-radius: var(--radius-lg); }
.td-video--instagram iframe { aspect-ratio: 9 / 17; background: #fff; }
.td-video__blank { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: radial-gradient(120% 80% at 50% 25%, #2a2a2f, #0b0b0c 70%); }
.td-video__blank svg { width: 30%; max-width: 120px; margin-top: -45%; opacity: .1; }

/* Gallery: one photo at a time, never cropped. Swipe or scroll natively; arrows, counter and thumbnails on top. */
.td-gallery { margin: var(--space-5) 0; }
.td-gallery__stage { position: relative; }
.td-gallery__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
  border-radius: var(--radius-md); background: var(--surface); outline: none; }
.td-gallery__track::-webkit-scrollbar { display: none; }
.td-gallery__track:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
.td-gallery__slide { flex: 0 0 100%; display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 2; scroll-snap-align: center; scroll-snap-stop: always; }
.td-gallery .td-gallery__slide img { display: block; width: auto !important; height: auto !important; max-width: 100% !important; max-height: 100% !important; object-fit: contain; border-radius: 0; cursor: zoom-in; }
.td-gallery__nav, .td-gallery__expand { position: absolute; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .94); color: #0b0b0c; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); cursor: pointer; opacity: 0; transition: opacity .2s ease; }
.td-gallery__nav svg, .td-gallery__expand svg { width: 20px; height: 20px; }
.td-gallery__expand { top: var(--space-3); right: var(--space-3); width: 36px; height: 36px; }
.td-gallery__expand svg { width: 16px; height: 16px; }
.td-gallery__nav--prev { left: var(--space-3); top: 50%; transform: translateY(-50%); }
.td-gallery__nav--next { right: var(--space-3); top: 50%; transform: translateY(-50%); }
.td-gallery__stage:hover .td-gallery__nav, .td-gallery__stage:hover .td-gallery__expand, .td-gallery__nav:focus-visible, .td-gallery__expand:focus-visible { opacity: 1; }
.td-gallery .td-gallery__nav:disabled { opacity: 0; pointer-events: none; }
@media (hover: none) { .td-gallery__nav { display: none; } .td-gallery__expand { opacity: 1; } }
.td-gallery__bar { display: flex; align-items: baseline; gap: var(--space-3); margin-top: var(--space-2); font-size: 14px; line-height: 20px; color: var(--ink-2); }
.td-gallery__count { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.td-gallery__thumbs { display: flex; gap: var(--space-2); margin-top: var(--space-3); padding: 2px; overflow-x: auto; scrollbar-width: none; }
.td-gallery__thumbs::-webkit-scrollbar { display: none; }
.td-gallery__thumb { flex: none; width: 64px; height: 64px; padding: 0; border: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); opacity: .5; cursor: pointer; transition: opacity .2s ease, box-shadow .2s ease; }
.td-gallery .td-gallery__thumb img { display: block; width: 100% !important; height: 100% !important; object-fit: cover; border-radius: 0; }
.td-gallery__thumb:hover { opacity: .85; }
.td-gallery__thumb[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--ink); }

/* Full-screen gallery */
.td-lightbox { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #000; color: #fff; overflow: hidden; }
.td-lightbox::backdrop { background: #000; }
.td-lightbox__track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; outline: none; }
.td-lightbox__track::-webkit-scrollbar { display: none; }
.td-lightbox__slide { flex: 0 0 100%; display: flex; align-items: center; justify-content: center; height: 100%; padding: 64px var(--space-4); box-sizing: border-box; scroll-snap-align: center; scroll-snap-stop: always; }
.td-lightbox__slide img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.td-lightbox__top { position: absolute; z-index: 1; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: var(--space-3) var(--space-4);
  font: 500 14px/20px var(--font-sans); color: rgba(255,255,255,.8); font-variant-numeric: tabular-nums; }
.td-lightbox__caption { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: var(--space-3) var(--space-4) var(--space-4); font: 400 14px/20px var(--font-sans); color: rgba(255,255,255,.85); text-align: center; }
.td-lightbox__btn { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; }
.td-lightbox__btn:hover { background: rgba(255,255,255,.22); }
.td-lightbox__btn svg { width: 22px; height: 22px; }
.td-lightbox__nav { position: absolute; z-index: 1; top: 50%; transform: translateY(-50%); }
.td-lightbox__nav--prev { left: var(--space-4); }
.td-lightbox__nav--next { right: var(--space-4); }
.td-lightbox__nav:disabled { opacity: 0; pointer-events: none; }
@media (hover: none) { .td-lightbox__nav { display: none; } }

.td-sources { margin-top: var(--space-6); padding-top: var(--space-3); border-top: 1px solid var(--line); font-size: 14px; line-height: 20px; color: var(--muted); }
.td-sources a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }

/* Badges and chips */
.td-badge { display: inline-flex; align-items: center; gap: var(--space-1); height: 20px; padding: 0 var(--space-2); border-radius: var(--radius-sm);
  font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; background: var(--surface); color: var(--muted); }
.td-badge--live { color: var(--live); }
.td-badge--live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.td-badge--updated { background: transparent; padding: 0; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 13px; }
.td-chip { display: inline-flex; align-items: center; height: 32px; padding: 0 var(--space-3); border-radius: var(--radius-full); border: 1px solid var(--line-control);
  font-size: 14px; font-weight: 500; color: var(--ink); background: var(--bg); transition: background-color var(--dur-fast) ease; }
/* Selected chip (the section you are on): filled ink, like a pressed button; hover does not change it. */
.td-chips .td-chip[aria-current="page"], .td-chips .td-chip[aria-current="page"]:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* Buttons */
.td-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: 44px; padding: 0 var(--space-5); border-radius: var(--radius-md);
  font: 500 15px/20px var(--font-sans); cursor: pointer; border: 1px solid var(--line-control); background: var(--bg); color: var(--ink);
  transition: background-color var(--dur-fast) ease, transform 120ms var(--ease-out); touch-action: manipulation; user-select: none; }
.td-btn:active { transform: scale(.97); }
.td-btn--primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.td-btn--block { width: 100%; }
.td-btn[aria-busy="true"] { opacity: .75; pointer-events: none; cursor: wait; }
.td-btn[aria-busy="true"]::before { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: td-spin .6s linear infinite; }
@keyframes td-spin { to { transform: rotate(360deg); } }

/* Ads */
.td-sponsor { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
.td-sponsor__brand { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.td-sponsor__brand img { height: 18px; width: auto; }
.td-native { display: flex; gap: var(--space-3); padding: var(--space-3); margin: var(--space-3) 0; border: 1px solid var(--line); border-radius: var(--radius-md); }
.td-native img { width: 120px; height: 80px; flex: none; object-fit: cover; border-radius: var(--radius-sm); }
.td-partner-box, .td-ad-slot { display: grid; place-items: center; background: var(--surface); border-radius: var(--radius-md); color: var(--muted); }
.td-partner-box--sidebar, .td-ad-slot--sidebar { width: var(--col-side); height: 600px; max-width: 100%; }
.td-partner-box--inline, .td-ad-slot--inline { width: 100%; aspect-ratio: 16 / 5; margin: var(--space-5) 0; }

/* Hover lives behind a fine pointer so touch screens never get stuck hover states. */
@media (hover: hover) and (pointer: fine) {
  .td-header__nav a:hover, .td-menu a:hover { color: var(--ink); }
  .td-icon-btn:hover { background: var(--surface-2); }
  .td-feed-item:hover .td-feed-item__title, .td-picks li:hover .td-picks__title, .td-card:hover .td-card__title, .td-post-link:hover .td-post-link__title { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
  .td-chip:hover, .td-btn:hover, .td-sponsor-mark:hover { background: var(--surface-2); }
  .td-btn--primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
}
@media (prefers-reduced-motion: reduce) {
  .td-btn, .td-icon-btn, .td-chip, .td-menu, .td-menu[data-open], .td-search-sheet, .td-search-sheet[data-open], .td-backdrop { transition: none; transform: none; }
  .td-btn:active, .td-icon-btn:active { transform: none; }
}

/* Sponsor mark (header and feed header): a quiet pill so it reads as a tappable placement. */
.td-sponsor-mark { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 40px; padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full); background: var(--surface); color: var(--ink); line-height: 1; transition: background-color var(--dur-fast) ease, transform 120ms var(--ease-out); }
.td-sponsor-mark:active { transform: scale(.97); }
.td-sponsor-mark__label { font-size: 10px; line-height: 12px; font-weight: 500; color: var(--muted); }
.td-sponsor-mark__name { font-size: 14px; line-height: 16px; font-weight: 700; letter-spacing: .18em; padding-left: .18em; }
.td-sponsor-mark img { height: 16px; width: auto; }
@media (max-width: 1023px) {
  .td-header .td-sponsor-mark { min-height: 36px; padding: 2px var(--space-3); }
  .td-header .td-sponsor-mark__name { font-size: 12px; letter-spacing: .14em; padding-left: .14em; }
}

/* Section header with an optional sponsor, the iXBT pattern */
.td-section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding-bottom: var(--space-2); border-bottom: 1px solid var(--line); }
.td-section-head h2 { margin: 0; font-size: 18px; line-height: 24px; font-weight: 700; }

/* Native card mark when the advertiser sent no image */
.td-native__mark { width: 120px; height: 80px; flex: none; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--ink); color: var(--bg);
  font-size: 15px; font-weight: 700; letter-spacing: .18em; }

/* Banner creative. `a.` raises specificity over `.td-root a { color: inherit }`. */
a.td-creative, .td-creative { position: relative; display: flex; overflow: hidden; border-radius: var(--radius-md); background: #0b0b0c; color: #ffffff; }
.td-creative__label { position: absolute; top: var(--space-3); right: var(--space-3); z-index: 1; font-size: 11px; font-weight: 500; color: rgba(255,255,255,.7); }
.td-creative__copy { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: var(--space-2); padding: var(--space-5); }
.td-creative__eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .2em; color: rgba(255,255,255,.8); }
.td-creative__title { font-size: 34px; line-height: 38px; font-weight: 700; letter-spacing: -.02em; }
.td-creative__text { font-size: 16px; line-height: 22px; color: rgba(255,255,255,.85); max-width: 32ch; }
.td-creative__cta { align-self: flex-start; margin-top: var(--space-2); padding: var(--space-2) var(--space-4); border-radius: var(--radius-full); background: #ffffff; color: #0b0b0c; font-size: 14px; font-weight: 600; }
/* Sidebar 300x600: fitted visual on top, copy/CTA at the bottom of the same dark ground. */
.td-creative--sidebar { flex-direction: column; justify-content: space-between; width: var(--col-side); max-width: 100%; height: 600px; }
.td-creative--sidebar .td-creative__visual { width: 100%; height: auto; max-height: 400px; object-fit: contain; object-position: top center !important; }
.td-creative--sidebar .td-creative__copy { flex: 1; justify-content: flex-end; }
.td-creative--sidebar.td-creative--has-media .td-creative__title { font-size: 28px; line-height: 32px; }
.td-creative--sidebar:not(.td-creative--has-media) { justify-content: flex-end; }
.td-creative--sidebar .td-creative__title { font-size: 44px; line-height: 46px; }
/* Inline: copy left, visual right. */
/* Rail beside an article: 160×600, 300×600 from 1400px. Visual fitted on the ink ground, copy below. */
.td-creative--rail { flex-direction: column; justify-content: center; width: 160px; height: 600px; }
.td-creative--rail .td-creative__visual { width: 100%; height: auto; max-height: 360px; object-fit: contain; object-position: top center !important; }
.td-creative--rail .td-creative__copy { padding: var(--space-4); gap: var(--space-1); }
.td-creative--rail:not(.td-creative--has-media) .td-creative__title { font-size: 24px; line-height: 28px; }
.td-creative--rail .td-creative__eyebrow { font-size: 11px; letter-spacing: .16em; }
.td-creative--rail .td-creative__title { font-size: 22px; line-height: 26px; }
.td-creative--rail .td-creative__text { font-size: 13px; line-height: 18px; }
.td-creative--rail .td-creative__cta { padding: 6px 12px; font-size: 13px; }
.td-creative--rail .td-creative__label { top: var(--space-2); right: var(--space-2); }
@media (min-width: 1400px) {
  .td-creative--rail { width: 300px; }
  .td-creative--rail .td-creative__visual { max-height: 400px; }
  .td-creative--rail .td-creative__copy { padding: var(--space-5); gap: var(--space-2); }
  .td-creative--rail .td-creative__title { font-size: 28px; line-height: 32px; }
  .td-creative--rail:not(.td-creative--has-media) .td-creative__title { font-size: 40px; line-height: 44px; }
  .td-creative--rail .td-creative__text { font-size: 15px; line-height: 21px; }
}

.td-creative--inline { width: 100%; min-height: 213px; margin: var(--space-5) 0; }
.td-creative--inline .td-creative__copy { flex: 1; }
.td-creative--inline .td-creative__visual { width: 42%; flex: none; object-fit: cover; }
@media (max-width: 520px) { .td-creative--inline { flex-direction: column-reverse; } .td-creative--inline .td-creative__visual { width: 100%; height: 200px; } }
/* Banners inside article text must not inherit prose link styling. */
.td-prose a.td-creative, .td-prose a.td-creative * { color: #ffffff; text-decoration: none; }
.td-prose a.td-creative .td-creative__cta { color: #0b0b0c; }
.td-prose a.td-creative .td-creative__text, .td-prose a.td-creative .td-creative__eyebrow { color: rgba(255,255,255,.85); }

/* Social: follow links and share row. Round 36px buttons on `surface`, icons in `ink`. */
.td-social, .td-share-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.td-social__btn { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: var(--radius-full); border: 0; background: var(--surface); color: var(--ink);
  cursor: pointer; transition: background-color var(--dur-fast) ease, transform 120ms var(--ease-out); touch-action: manipulation; }
.td-social__btn:active { transform: scale(.94); }
.td-social__btn svg { width: 16px; height: 16px; }
.td-share-row .td-label { margin-right: var(--space-1); }
.td-share-native { display: none; }
.td-has-native-share .td-share-native { display: grid; }
@media (hover: hover) and (pointer: fine) { .td-social__btn:hover { background: var(--surface-2); } }


/* site.css */
/* Page layout for the public site. Component styles live in components.css (from the Design System). */
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); }
.td-skip { position: absolute; left: -9999px; }
.td-skip:focus { left: var(--space-4); top: var(--space-2); z-index: 20; background: var(--bg); padding: var(--space-2) var(--space-3); }

.td-wrap { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--space-4); }
.td-home { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); padding-block: var(--space-5) var(--space-7); }
.td-home__side, .td-home__ads { display: none; }
.td-home__main { min-width: 0; display: flex; flex-direction: column; gap: var(--space-5); }
.td-section-title { margin: 0 0 var(--space-2); }

.td-tabs { display: flex; gap: var(--space-2); }
.td-tabs a { flex: 1; text-align: center; height: 40px; line-height: 40px; border-radius: var(--radius-md); background: var(--surface); font: 500 15px/40px var(--font-sans); color: var(--ink-2); }
.td-tabs a[aria-current="page"] { background: var(--ink); color: var(--bg); }

.td-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.td-more-row { margin-top: var(--space-5); }

.td-page-title { margin: var(--space-5) 0 var(--space-2); font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -.015em; }
.td-article-page { padding-block: var(--space-6) var(--space-7); }
.td-article .td-media:first-of-type { margin-top: var(--space-5); }
.td-hero { margin: var(--space-5) 0 0; }
.td-hero > img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-md); background: var(--surface); }
.td-prose table { display: block; overflow-x: auto; border-collapse: collapse; margin: 0 0 var(--space-4); }
.td-prose td, .td-prose th { border: 1px solid var(--line); padding: var(--space-2) var(--space-3); }
.td-prose img { max-width: 100%; height: auto; }
.td-prose details { border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); margin: 0 0 var(--space-3); }
.td-prose summary { font-weight: 600; cursor: pointer; }
.td-embed-link { margin: var(--space-5) 0; }
.td-embed-link a { display: block; padding: var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-md); color: var(--ink); text-decoration: none; font-weight: 500; }
.td-embed-video-file video { width: 100%; border-radius: var(--radius-md); }

.td-footer { border-top: 1px solid var(--line); padding-block: var(--space-6) var(--space-7); margin-top: var(--space-7); }
.td-footer__grid { display: grid; gap: var(--space-5); }
.td-footer__brand { justify-self: start; }
.td-footer__brand .td-logo__word { font-size: 23px; }
.td-footer__links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); font-size: 15px; font-weight: 500; }
.td-footer__links a { color: var(--ink-2); }
.td-footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.td-footer__legal a { color: var(--muted); margin-right: var(--space-4); }
.td-related { max-width: var(--measure); margin: var(--space-7) auto 0; }
.td-related__grid { display: grid; gap: var(--space-5); }
@media (min-width: 640px) { .td-related__grid { grid-template-columns: 1fr 1fr; } }
.td-subcats { margin-top: var(--space-3); }
.td-search { display: flex; gap: var(--space-2); margin: var(--space-3) 0 var(--space-5); }
.td-search input { flex: 1; min-width: 0; height: 44px; padding: 0 var(--space-3); font: 400 16px/20px var(--font-sans); color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-control); border-radius: var(--radius-md); }
.td-empty { padding: var(--space-6) 0; color: var(--ink-2); }

/* Article rails: the page widens so a banner fits each side of the 680px column. */
.td-rail { display: none; }
@media (min-width: 1120px) {
  .td-article-page { max-width: 1440px; }
  .td-article-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, var(--measure)) minmax(0, 1fr); column-gap: var(--space-6); align-items: start; }
  .td-article-layout .td-article { width: 100%; }
  .td-rail { display: flex; position: sticky; top: calc(var(--header-h) + var(--space-5)); }
  .td-rail--left { justify-content: flex-end; }
  .td-rail--right { justify-content: flex-start; }
}

/* Desktop: three columns. Kept last so it overrides the phone-first rules above. */
@media (min-width: 1024px) {
  .td-home { grid-template-columns: var(--col-side) minmax(0, 1fr) var(--col-side); }
  /* The feed is the page's main column: a hairline card makes that readable at a glance. */
  .td-home__main { padding: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg); }
  .td-home__side { display: flex; flex-direction: column; gap: var(--space-5); }
  .td-home__ads { display: flex; flex-direction: column; gap: var(--space-6); }
  .td-home--two { grid-template-columns: minmax(0, 1fr) var(--col-side); }
  .td-home--two .td-home__side { display: none; }
  .td-tabs { display: none; }
}

.td-article__share { padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
.td-article__share--end { margin-top: var(--space-6); border-top: 1px solid var(--line); }
.td-article__meta { border-bottom: 0; padding-bottom: 0; margin-bottom: var(--space-2); }
.td-article__meta a { color: var(--ink-2); }

/* Static pages */
.td-page-body h2 { margin-top: var(--space-6); }
.td-page-body .td-social { margin: var(--space-3) 0 var(--space-5); }
.td-embed-map { position: relative; margin: var(--space-4) 0; border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 16 / 9; background: var(--surface); }
.td-embed-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Forms */
.td-contact { margin: var(--space-4) 0 var(--space-6); }
.td-form { display: grid; gap: var(--space-4); }
.td-field { display: grid; gap: var(--space-1); }
.td-field label { font-size: 15px; font-weight: 600; }
.td-field input, .td-field textarea { width: 100%; padding: var(--space-3); font: 400 16px/24px var(--font-sans); color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-control); border-radius: var(--radius-md); }
.td-field textarea { resize: vertical; }
.td-field__error { margin: 0; font-size: 14px; color: var(--live); }
.td-form .td-btn { justify-self: start; }
.td-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Cookie notice */
.td-cookie { position: fixed; left: var(--space-4); right: var(--space-4); bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px)); z-index: 12;
  max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); font-size: 14px; line-height: 20px; }
.td-cookie p { margin: 0; color: var(--ink-2); }
.td-cookie a { color: var(--accent); text-decoration: underline; }
.td-cookie .td-btn { height: 36px; padding: 0 var(--space-4); flex: none; }

/* Go to top button */
.td-to-top {
  position: fixed;
  right: calc(var(--space-5) + env(safe-area-inset-right, 0px));
  bottom: calc(var(--space-5) + env(safe-area-inset-bottom, 0px));
  z-index: 20;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--bg);
  border: 1px solid var(--line-control);
  color: var(--ink);
  box-shadow: var(--shadow-pop);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
  touch-action: manipulation;
  user-select: none;
}
.td-to-top svg { display: block; }
.td-to-top:hover {
  background: var(--surface);
  color: var(--brand-blue);
  border-color: var(--brand-blue);
  transform: translateY(-2px);
}
.td-to-top:active {
  transform: scale(.92);
}
.td-to-top:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.td-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .td-to-top { transition: none; }
}

/* Sidebar of the endless pages: sections and the footer links stay in view while the stream grows. */
.td-side-sticky { position: sticky; top: calc(var(--header-h) + var(--space-5)); display: flex; flex-direction: column; gap: var(--space-5); }
.td-mini-footer { display: flex; flex-direction: column; gap: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--line); font-size: 13px; line-height: 18px; color: var(--muted); }
.td-mini-footer p { margin: 0; }
.td-mini-footer__links { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); }
.td-root .td-mini-footer__links a { color: var(--ink-2); }
.td-root .td-mini-footer__links a:hover { color: var(--ink); }
.td-mini-footer .td-social__btn { width: 32px; height: 32px; }
.td-mini-footer { transition: opacity .25s ease, visibility .25s; }
.td-mini-footer.is-away { opacity: 0; visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .td-mini-footer { transition: none; } }


/* video.css */
/* Videos: the home "Videolar" row, the in-page viewer and the stage a phone-shaped main video stands on. */
.td-videos { margin: var(--space-5) 0 var(--space-6); }
.td-videos__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.td-videos__links { display: inline-flex; align-items: center; gap: var(--space-4); }
.td-root a.td-videos__more { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.td-videos__more svg { width: 14px; height: 14px; }
.td-videos__rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 12px) / 4); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; outline: none; }
.td-videos__rail::-webkit-scrollbar { display: none; }
.td-videos__rail:focus-visible { box-shadow: 0 0 0 2px var(--ink); border-radius: var(--radius-md); }
.td-root a.td-reel { display: block; scroll-snap-align: start; color: #fff; }
.td-reel__media { position: relative; display: block; aspect-ratio: 9 / 16; overflow: hidden; border-radius: var(--radius-md); background: radial-gradient(120% 80% at 50% 25%, #2a2a2f, #0b0b0c 70%); }
.td-reel__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.td-reel__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.78), transparent 55%); }
.td-reel__play { position: absolute; z-index: 1; left: 10px; top: 10px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; }
.td-reel__play svg { width: 14px; height: 14px; margin-left: 2px; }
.td-reel__title { position: absolute; z-index: 1; left: 10px; right: 10px; bottom: 10px; font: 600 13px/18px var(--font-sans); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (hover: hover) and (pointer: fine) { .td-root a.td-reel:hover .td-reel__media img { transform: scale(1.035); } }
@media (max-width: 640px) { .td-videos__rail { grid-auto-columns: 42%; margin-inline: calc(-1 * var(--space-4)); padding-inline: var(--space-4); scroll-padding-inline: var(--space-4); } }

/* /videolar: the same tiles in a grid. */
.td-videos-page { padding-block: var(--space-5) var(--space-7); }
.td-videos-page__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); }
.td-videos-page__head .td-page-title { margin: 0; }
.td-videos-page__head .td-meta { margin: var(--space-2) 0 0; }
.td-videos-page__head .td-btn { display: inline-flex; align-items: center; gap: 8px; }
.td-videos-page__head .td-btn svg { width: 16px; height: 16px; }
.td-videos-page__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.td-videos-page__grid .td-reel__title { font-size: 14px; line-height: 19px; }
.td-videos-page .td-more-row { margin-top: var(--space-6); }
@media (max-width: 1023px) { .td-videos-page__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .td-videos-page__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

.td-hero--video .td-video { margin: 0; }
.td-hero--video > .td-video:not(.td-video--vertical) .td-video__poster, .td-hero--video > .td-video:not(.td-video--vertical) iframe { border-radius: var(--radius-md); }
.td-stage { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; gap: var(--space-3); padding: var(--space-5) var(--space-4) var(--space-4); border-radius: var(--radius-md); overflow: hidden; background: #0b0b0c; }
.td-stage__glow { position: absolute; inset: -60px; z-index: -1; background-size: cover; background-position: center; filter: blur(48px) saturate(1.3) brightness(.5); }
.td-stage .td-video--vertical { width: min(100%, 340px); }
.td-root a.td-stage__open { font: 500 13px/1 var(--font-sans); color: rgba(255,255,255,.75); text-decoration: none; }
.td-root a.td-stage__open:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* In-page viewer: player in the middle, story beside it (below it on phones), ↑/↓ to the next video. */
.td-viewer { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8,8,9,.96); color: #fff; overflow: hidden; }
.td-viewer::backdrop { background: rgba(0,0,0,.6); }
.td-viewer[open] { display: flex; align-items: center; justify-content: center; gap: var(--space-6); }
.td-viewer__frame { flex: none; width: min(1100px, calc(100vw - 480px)); aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; background: #000 center / cover no-repeat; }
.td-viewer__frame.is-vertical { width: auto; height: calc(100dvh - 48px); max-width: calc(100vw - 32px); aspect-ratio: 9 / 16; }
.td-viewer__frame.is-instagram { background-color: #fff; }
.td-viewer__frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.td-viewer__info { flex: 0 1 300px; align-self: flex-end; padding-bottom: var(--space-6); }
.td-viewer__meta { margin: 0 0 var(--space-2); font: 600 11px/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: #a1a1a6; }
.td-viewer__title { margin: 0; font: 700 22px/28px var(--font-sans); letter-spacing: -.015em; text-wrap: balance; }
.td-viewer__links { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.td-viewer__links a { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 999px; font: 600 14px/1 var(--font-sans); text-decoration: none; }
.td-viewer .td-viewer__read { background: #fff; color: #0b0b0c; }
.td-viewer .td-viewer__open { background: rgba(255,255,255,.12); color: #fff; }
.td-viewer__controls { position: absolute; top: var(--space-4); right: var(--space-4); bottom: var(--space-4); display: flex; flex-direction: column; justify-content: space-between; align-items: center; pointer-events: none; }
.td-viewer__steps { display: flex; flex-direction: column; gap: var(--space-2); margin-block: auto; }
.td-viewer__btn { pointer-events: auto; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; transition: background .2s ease, opacity .2s ease; }
.td-viewer__btn svg { width: 22px; height: 22px; }
.td-viewer__btn:hover { background: rgba(255,255,255,.22); }
.td-viewer__btn:disabled { opacity: .3; cursor: default; }
.td-viewer__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (max-width: 1023px) {
  .td-viewer[open] { flex-direction: column; justify-content: flex-start; gap: 0; }
  .td-viewer__frame, .td-viewer__frame.is-vertical { width: 100vw; height: auto; max-width: none; flex: 1 1 auto; min-height: 0; border-radius: 0; aspect-ratio: auto; }
  .td-viewer__frame:not(.is-vertical) { flex: none; aspect-ratio: 16 / 9; margin-top: auto; }
  .td-viewer__info { flex: none; align-self: stretch; padding: var(--space-4) 72px var(--space-5) var(--space-4); }
  .td-viewer__title { font-size: 18px; line-height: 24px; }
}


/* carlife.css */
/* Avtomobil section dressed as carlife.az (the family's car media): dark band with carlife's newest stories
   and videos, then Tedroid's car archive as a photo grid. Classes are clt-* so nothing else on Tedroid changes. */
.clt-band { background: #0b0b0c; color: #f5f5f7; padding-block: var(--space-6) var(--space-7); }
.clt-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-5); padding-bottom: var(--space-5); }
.clt-head__copy { max-width: 60ch; }
.td-root a.clt-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.clt-mark { display: block; flex: none; }
.clt-brand__word { font: 700 26px/1 var(--font-sans); letter-spacing: -.035em; position: relative; top: .05em; }
.clt-brand__word span { font-weight: 500; color: #8b8b90; letter-spacing: -.02em; }
.clt-head h2 { margin: var(--space-4) 0 0; font: 700 32px/38px var(--font-sans); letter-spacing: -.025em; color: #fff; text-wrap: balance; }
.clt-head p { margin: var(--space-2) 0 0; font-size: 16px; line-height: 24px; color: #a1a1a6; }
.clt-head__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.td-root a.clt-btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; background: rgba(255,255,255,.1); color: #fff; font: 600 15px/1 var(--font-sans); text-decoration: none; transition: background .2s ease; }
.td-root a.clt-btn svg { width: 16px; height: 16px; }
.td-root a.clt-btn:hover { background: rgba(255,255,255,.18); }
.td-root a.clt-btn--primary { background: #fff; color: #0b0b0c; }
.td-root a.clt-btn--primary:hover { background: #e7e7e4; }
.td-root a.clt-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.clt-grid { display: grid; gap: 24px; }
.clt-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.clt-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.td-root a.clt-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.clt-card__media { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius-md); background: var(--surface); }
.clt-band .clt-card__media { background: #1c1c1f; }
.clt-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.clt-card__body { display: flex; flex-direction: column; gap: 6px; }
.clt-card__eyebrow { font: 600 11px/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.clt-band .clt-card__eyebrow { color: #a1a1a6; }
.clt-card__title { font: 600 16px/22px var(--font-sans); letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (hover: hover) and (pointer: fine) {
  .td-root a.clt-card:hover .clt-card__media img { transform: scale(1.035); }
  .td-root a.clt-card:hover .clt-card__title { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
}

.clt-videos { margin-top: var(--space-6); }
.clt-label { margin: 0 0 var(--space-3); font: 600 12px/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: #a1a1a6; }
.clt-rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 5 * 14px) / 6); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; outline: none; }
.clt-rail::-webkit-scrollbar { display: none; }
.td-root a.clt-card--reel { position: relative; scroll-snap-align: start; }
.clt-card--reel .clt-card__media { aspect-ratio: 9 / 16; }
.clt-card--reel .clt-card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.75), transparent 55%); }
.clt-card--reel .clt-card__body { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 1; color: #fff; }
.clt-card--reel .clt-card__title { font-size: 14px; line-height: 19px; }
.clt-card__play { position: absolute; z-index: 1; left: 10px; top: 10px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; }
.clt-card__play svg { width: 14px; height: 14px; margin-left: 2px; }

.clt-archive { padding-top: var(--space-6); }
.clt-archive__head { padding-bottom: var(--space-5); }
.clt-archive__head h1 { margin: 0; font: 700 40px/44px var(--font-sans); letter-spacing: -.02em; }
.clt-archive .td-more-row { margin-top: var(--space-6); }

@media (max-width: 1023px) {
  .clt-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clt-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clt-rail { grid-auto-columns: 180px; }
}
@media (max-width: 640px) {
  .clt-head h2 { font-size: 26px; line-height: 32px; }
  .clt-grid { gap: 18px; }
  .clt-grid--3 { grid-template-columns: minmax(0, 1fr); }
  .clt-rail { grid-auto-columns: 150px; margin-inline: calc(-1 * var(--space-4)); padding-inline: var(--space-4); scroll-padding-inline: var(--space-4); }
  .clt-archive__head h1 { font-size: 28px; line-height: 34px; }
}
@media (prefers-reduced-motion: reduce) { .clt-card__media img { transition: none; } }

/* End-of-story box on Avtomobil posts, as wide as the related posts under it: brand and button on one line, the heading below. */
.clt-promo { max-width: var(--measure); margin: var(--space-7) auto var(--space-5); padding: var(--space-5); border-radius: var(--radius-lg); background: #0b0b0c; color: #f5f5f7; }
.clt-promo__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); padding-bottom: var(--space-5); }
.clt-promo__head h2 { flex: 1 1 100%; order: 3; margin: 0; font: 700 22px/28px var(--font-sans); letter-spacing: -.015em; color: #fff; }
.clt-promo .clt-brand__word { font-size: 21px; }
.clt-promo .clt-card__media { background: #1c1c1f; }
.clt-promo .clt-card__eyebrow { color: #a1a1a6; }
@media (max-width: 640px) { .clt-promo { margin-inline: calc(-1 * var(--space-4)); border-radius: 0; } }
.clt-promo__head .clt-btn { margin-left: auto; }
.clt-promo .clt-grid { gap: 16px; }
.clt-promo .clt-card__title { font-size: 15px; line-height: 20px; }
@media (max-width: 640px) { .clt-promo .clt-grid--3 { grid-template-columns: minmax(0, 1fr); } }


/* Bridge for core helpers rendered outside Twig (shareButtons()) */
.share-buttons { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.share-btn { height: 36px; min-width: 36px; padding: 0 var(--space-3); display: inline-grid; place-items: center; border-radius: var(--radius-full); border: 0; background: var(--surface); color: var(--ink); font: 600 13px/1 var(--font-sans); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .share-btn:hover { background: var(--surface-2); } }

/* ==========================================================================
   Rich Partner Formats (Vertical & Horizontal)
   ========================================================================== */
.partner-box.partner-card,
.partner-card {
  position: relative;
  overflow: hidden;
  background-color: var(--partner-bg, var(--ad-bg, #000000));
  color: var(--partner-color, var(--ad-color, #ffffff));
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  margin: var(--space-5) 0;
  box-sizing: border-box;
  font-family: var(--font-sans, system-ui, -apple-system, sans-serif);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.partner-box.partner-card:hover,
.partner-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.partner-card-link {
  display: flex;
  text-decoration: none !important;
  color: inherit !important;
  width: 100%;
  height: 100%;
  position: relative;
  box-sizing: border-box;
}

/* Partner disclosure badge */
.partner-card-badge {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 10;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.04em;
  pointer-events: none;
  user-select: none;
}

/* Vertical Card (Portrait) */
.partner-card-vertical .partner-card-link {
  flex-direction: column;
  min-height: 480px;
}

.partner-card-vertical .partner-card-media {
  width: 100%;
  height: 260px;
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  background: transparent;
}

.partner-card-vertical .partner-card-media .partner-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
}

.partner-card-vertical .partner-card-content {
  padding: 24px 24px 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: flex-end;
}

/* Vertical Card without image: bold typography focus */
.partner-card-vertical.partner-card--no-image .partner-card-content {
  justify-content: center;
  padding: 48px 28px;
  min-height: 420px;
}

.partner-card-vertical.partner-card--no-image .partner-card-title {
  font-size: 2.25rem;
  line-height: 1.15;
  margin-bottom: 14px;
}

/* Horizontal Card (Landscape) */
.partner-card-horizontal .partner-card-link {
  display: grid;
  grid-template-columns: minmax(180px, 45%) 1fr;
  min-height: 240px;
  align-items: stretch;
}

.partner-card-horizontal .partner-card-media {
  width: 100%;
  height: 100%;
  min-height: 100%;
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 0;
  background: transparent;
}

.partner-card-horizontal .partner-card-media .partner-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
}

.partner-card-horizontal .partner-card-content {
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.partner-card-horizontal.partner-card--no-image .partner-card-link {
  grid-template-columns: 1fr;
}

.partner-card-horizontal.partner-card--no-image .partner-card-content {
  padding: 36px 44px;
}

/* Card Elements */
.partner-card-brand {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 8px;
}

.partner-card-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: inherit;
  line-height: 1.2;
  margin: 0 0 10px 0;
  letter-spacing: -0.02em;
}

.partner-card-desc {
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.45;
  margin: 0 0 20px 0;
}

.partner-card-action-wrap {
  margin-top: auto;
  padding-top: 10px;
}

.partner-card-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: #000000;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 9999px;
  transition: transform 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  width: fit-content;
}

.partner-card-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.partner-card-link:hover .partner-card-action {
  transform: translateX(4px);
  background: #f4f4f5;
}

.partner-card-link:hover .partner-card-arrow {
  transform: translateX(3px);
}

@media (max-width: 680px) {
  .partner-card-horizontal .partner-card-link {
    grid-template-columns: 1fr;
  }
  .partner-card-horizontal .partner-card-media {
    width: 100%;
    height: 220px;
    max-height: 220px;
    margin: 0;
    padding: 0;
  }
  .partner-card-horizontal .partner-card-media .partner-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .partner-card-horizontal .partner-card-content {
    padding: 24px 20px;
  }
  .partner-card-title {
    font-size: 1.5rem;
  }
  .partner-card-vertical.partner-card--no-image .partner-card-title {
    font-size: 1.75rem;
  }
}

/* Image creative units: fill full area with zero margins/padding */
.partner-box.partner-type-image {
  border: none;
  background: transparent;
  padding: 0;
  margin: var(--space-4) 0;
  overflow: hidden;
  border-radius: var(--radius-md, 8px);
}

.partner-box.partner-type-image a,
.partner-box.partner-type-image picture,
.partner-box.partner-type-image img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
}

/* ==========================================================================
   News Feed Native Format (for Home & Category news lists)
   ========================================================================== */
.partner-box.partner-card-feed,
.partner-card-feed {
  background-color: var(--partner-bg, var(--surface, #ffffff));
  color: var(--partner-color, var(--ink, #111827));
  border: 1px solid var(--line-control, rgba(0, 0, 0, 0.08));
  border-radius: var(--radius-lg, 14px);
  padding: 12px 16px;
  margin: var(--space-3, 12px) 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.partner-box.partner-card-feed:hover,
.partner-card-feed:hover {
  border-color: var(--brand-blue, #2563eb);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.partner-card-feed-link {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none !important;
  color: inherit !important;
  width: 100%;
}

.partner-card-feed-media {
  width: 130px;
  height: 86px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  background: var(--line-subtle, #f3f4f6);
}

.partner-card-feed-media .partner-card-feed-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
}

.partner-card-feed-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  flex-grow: 1;
}

.partner-card-feed-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(0, 0, 0, 0.06);
  color: var(--muted, #6b7280);
  padding: 2px 7px;
  border-radius: 4px;
  width: fit-content;
  line-height: 1.35;
  user-select: none;
}

.partner-card-feed-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: inherit;
  margin: 2px 0 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.partner-card-feed-brand {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted, #6b7280);
  margin: 0;
}

.partner-card-feed.partner-card--no-image .partner-card-feed-media {
  display: none;
}

@media (max-width: 600px) {
  .partner-box.partner-card-feed,
  .partner-card-feed {
    padding: 10px 12px;
  }
  .partner-card-feed-link {
    gap: 12px;
  }
  .partner-card-feed-media {
    width: 96px;
    height: 68px;
  }
  .partner-card-feed-title {
    font-size: 0.95rem;
  }
  .partner-card-feed-brand {
    font-size: 12px;
  }
}

/* ==========================================================================
   Reader Controls, Audio TTS, Auto ToC, Bookmarks/History & Quote Popover
   ========================================================================== */
.td-preview-banner {
  margin: var(--space-3) 0 var(--space-4);
  padding: 12px 16px;
  border-radius: var(--radius-md, 10px);
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--ink);
  font-size: 14px;
}

.td-reader-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: var(--space-3);
  padding: 8px 12px;
  border-radius: var(--radius-md, 10px);
  background: var(--surface);
  border: 1px solid var(--line);
}
.td-reader-bar__right,
.td-tts,
.td-font-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.td-reader-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border-radius: var(--radius-full, 999px);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: 600 13px/1 var(--font-sans);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.td-reader-btn:hover {
  background: var(--surface-2);
}
.td-bookmark-btn.is-saved {
  border-color: var(--accent, #2563eb);
  color: var(--accent, #2563eb);
}
.td-bookmark-btn.is-saved svg {
  fill: currentColor;
}

.td-toc {
  margin-top: var(--space-5);
  padding: 14px 18px;
  border-radius: var(--radius-md, 12px);
  background: var(--surface);
  border: 1px solid var(--line);
}
.td-toc__title {
  font: 700 14px/1.3 var(--font-sans);
  cursor: pointer;
  user-select: none;
}
.td-toc__list {
  margin: 10px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}
.td-toc__item {
  font-size: 14px;
  line-height: 1.4;
}
.td-toc__item--h3 {
  margin-left: 14px;
  font-size: 13px;
  color: var(--muted);
}
.td-toc__item a {
  color: inherit;
  text-decoration: none;
}
.td-toc__item a:hover {
  text-decoration: underline;
}

.td-header__bookmarks-btn {
  position: relative;
}
.td-badge-count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent, #2563eb);
  color: #fff;
  font: 700 10px/16px var(--font-sans);
  text-align: center;
}

.td-saved-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.td-saved-tab {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 13px/1 var(--font-sans);
  cursor: pointer;
}
.td-saved-tab.is-active {
  background: var(--surface-2);
  color: var(--ink);
}
.td-saved-clear {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 12px/1 var(--font-sans);
  cursor: pointer;
}
.td-saved-panel {
  max-height: 60vh;
  overflow-y: auto;
  display: grid;
  gap: 8px;
}
.td-saved-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md, 10px);
  background: var(--surface);
}
.td-saved-item__link {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.td-saved-item__title {
  font: 600 14px/1.35 var(--font-sans);
}
.td-saved-item__remove {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 13px;
}

.td-quote-popover {
  position: absolute;
  z-index: 9999;
  background: #111827;
  color: #fff;
  padding: 4px;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.td-quote-popover__btn {
  border: 0;
  background: transparent;
  color: #fff;
  padding: 5px 12px;
  font: 600 12px/1 var(--font-sans);
  cursor: pointer;
  white-space: nowrap;
}

/* Error & Not Found Pages */
.error-page-section {
  padding: 4rem 1.25rem 3rem;
  text-align: center;
  max-width: 840px;
  margin: 0 auto;
}
.error-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--live);
  background: rgba(200, 40, 29, 0.1);
  border: 1px solid rgba(200, 40, 29, 0.25);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
}
.error-badge.warning {
  color: #d97706;
  background: rgba(217, 119, 6, 0.1);
  border-color: rgba(217, 119, 6, 0.28);
}
.error-number {
  font-size: clamp(5rem, 14vw, 8rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: var(--live);
  margin-bottom: 1.25rem;
  user-select: none;
  font-family: var(--font-sans);
}
.error-number.warning {
  color: #d97706;
}
.error-heading {
  font-family: var(--font-sans);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 1.25rem;
}
.error-lead {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 600px;
  margin: 0 auto 2.25rem;
}
.error-search-wrap {
  max-width: 540px;
  margin: 0 auto 2.25rem;
}
.error-search-form {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.35rem 0.35rem 0.35rem 1rem;
  transition: border-color 0.2s;
}
.error-search-form:focus-within {
  border-color: var(--accent);
}
.error-search-icon {
  width: 20px;
  height: 20px;
  color: var(--muted);
  flex-shrink: 0;
  margin-right: 0.75rem;
}
.error-search-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  outline: none;
  min-width: 0;
}
.error-search-input::placeholder {
  color: var(--muted);
}
.error-search-btn {
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
}
.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 2.5rem;
}
.btn-error-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: var(--on-accent) !important;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.925rem;
  font-family: var(--font-sans);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
}
.btn-error-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}
.btn-error-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  color: var(--ink) !important;
  border: 1px solid var(--line);
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.925rem;
  font-family: var(--font-sans);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-error-secondary:hover {
  background: var(--surface-2);
}
.error-sections {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: var(--muted);
  padding: 1.25rem 0 0;
}
.error-sections-label {
  font-weight: 600;
  color: var(--ink);
  margin-right: 0.35rem;
}
.error-section-link {
  color: var(--ink-2);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.15s, color 0.15s;
  text-decoration: none;
  font-weight: 500;
}
.error-section-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.error-divider {
  border: 0;
  height: 1px;
  background: var(--line);
  max-width: 840px;
  margin: 2.5rem auto;
}
.error-feed-section {
  max-width: 840px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}
.error-feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}
.error-feed-title {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.error-feed-more {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}
.error-feed-more:hover {
  text-decoration: underline;
}
.news-grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) {
  .news-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
.error-debug-panel {
  margin: 2.5rem auto 0;
  max-width: 760px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.error-debug-toggle {
  padding: 0.85rem 1.15rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.error-debug-toggle:hover {
  color: var(--ink);
}
.error-debug-body {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.825rem;
  background: var(--bg);
}
.error-debug-pre {
  max-height: 280px;
  overflow-y: auto;
  white-space: pre-wrap;
  background: var(--surface);
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  margin-top: 0.65rem;
  line-height: 1.45;
  color: var(--ink);
}



