/* tribeNews.org — hybrid build: AIStudio v3 operator terminal × Newsblock pagination × tribeCast canon.
   Pure #000 body; raised panels; brand #FF7A29; per-tribe --accent set at runtime.
   PROTECTED (carried from production, do not restyle): .tn-title, .tn-highlight, .tn-accent-header, .tn-media-chip. */

/* ── B7: cross-document view transitions — shell holds fixed across /news/ ↔ /radar/.
   Chrome/Edge/Safari animate; Firefox ignores @view-transition and repaints identical markup. */
@view-transition { navigation: auto; }
.tn-topbar { view-transition-name: tn-topbar; }
.tn-rail { view-transition-name: tn-rail; }

/* ── Base ─────────────────────────────────────────────────────────── */
html, body, #tribenews-app { background: var(--bg); color: var(--text); min-height: 100%; margin: 0; }
* { box-sizing: border-box; }
body {
  overflow-x: hidden;
  font-family: var(--font-sans);
  font-feature-settings: "liga" 1;
  text-rendering: geometricPrecision;
}
body.reader-open, body.search-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { appearance: none; }
img { max-width: 100%; }

.tn-app {
  min-height: 100svh;
  background:
    radial-gradient(circle at 10% -12%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 30%),
    radial-gradient(circle at 88% 0, rgba(255, 255, 255, .05), transparent 24%),
    var(--bg);
  padding: 0 16px 16px;
}
.tn-shell { max-width: 1240px; margin: 0 auto; position: relative; }

/* ── Type registers ───────────────────────────────────────────────── */
.tn-kicker, .tn-meta {
  color: var(--text-faint);
  text-transform: uppercase; letter-spacing: .12em;
  font-size: 11px; font-weight: 700;
  font-family: var(--font-mono);
}
.tn-cat, .tn-tag, .tn-source {
  color: var(--accent);
  text-transform: uppercase; letter-spacing: .12em;
  font-size: 11px; font-weight: 700;
  font-family: var(--font-mono);
}
.tn-sep { color: color-mix(in srgb, var(--accent) 66%, #777); }
.tn-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tn-summary { color: #cfcfcf; line-height: 1.6; font-size: 15px; }

/* ── Highlighter H1 v2 — spaced bars + per-tribe texture (new canon) ─ */
.tn-title {
  font-size: clamp(28px, 5.6vw, 58px);
  line-height: var(--tn-hl-line-height);
  letter-spacing: -.055em;
  margin: 8px 0 12px;
}
.tn-highlight {
  display: inline;
  padding: var(--tn-hl-padding);
  background-color: var(--accent);
  background-image: var(--tribe-texture);
  background-size: 128px 128px;
  background-blend-mode: multiply;
  color: var(--accent-ink);
  line-height: var(--tn-hl-line-height);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  text-shadow: none;
}

/* ── PROTECTED: H2/H3 square pill (verbatim from production) ──────── */
.tn-accent-header {
  display: inline-block; width: max-content; max-width: 100%;
  border: 1px solid var(--accent); border-radius: 0;
  background: transparent; color: var(--accent);
  padding: .18em .42em;
  text-transform: uppercase; letter-spacing: .08em;
  font-weight: 950; line-height: 1.05;
}
.tn-media-chip {
  position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px);
  padding: 5px 7px;
  background: rgba(0, 0, 0, .88); border: 1px solid rgba(255, 255, 255, .12);
  color: var(--accent);
  font-size: 10px; font-weight: 950; letter-spacing: .12em; line-height: 1;
  text-transform: uppercase; font-family: var(--font-mono);
  z-index: 2;
}

/* ── Canon bicolor logotype: "tribe" orange / product warm-white ──── */
.tn-lt { font-family: var(--font-display); font-weight: 800; letter-spacing: -.045em; white-space: nowrap; }
.tn-lt-tribe { color: var(--brand); }
.tn-lt-word { color: var(--warm-white); }
.tn-lt-tm { color: var(--warm-white); font-size: .6em; vertical-align: super; font-weight: 500; }
/* mono variant for accent-filled chips: whole mark inherits chip ink (bicolor is illegible on bright accents) */
.tn-lt-mono .tn-lt-tribe, .tn-lt-mono .tn-lt-word, .tn-lt-mono .tn-lt-tm { color: inherit; }

/* ── LEDs (operator register) ─────────────────────────────────────── */
.tn-led {
  width: 6px; height: 6px; border-radius: 999px;
  display: inline-block; position: relative; flex: 0 0 auto;
}
.tn-led::after {
  content: ""; position: absolute; inset: -3px; border-radius: 999px;
  border: 1px solid currentColor; opacity: .4;
  animation: tnLedPing 2s cubic-bezier(0, 0, .2, 1) infinite;
}
.tn-led.led-green, .tn-led.led-rest { background: var(--led-rest); color: var(--led-rest); }
.tn-led.led-red { background: var(--led-red); color: var(--led-red); }
.tn-led.led-dormant { background: #27272a; color: #52525b; }
.tn-led.led-dormant::after { animation: none; opacity: 0; }
@keyframes tnLedPing { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(3.5); opacity: 0; } }

/* ── Panels ───────────────────────────────────────────────────────── */
.tn-card {
  border: 1px solid var(--hairline);
  background: var(--panel);
  border-radius: var(--radius-card);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .04), 0 16px 48px rgba(0, 0, 0, .55);
  overflow: hidden;
}
.tn-content { padding: 18px; }

/* ── Buttons / beam sweep ─────────────────────────────────────────── */
.tn-btn, .tn-icon-btn {
  position: relative; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .055);
  color: #fff; border-radius: 999px; padding: 10px 13px;
  font-weight: 800; cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.tn-icon-btn { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; font-size: 20px; line-height: 1; }
.tn-btn::before, .tn-icon-btn::before {
  content: ""; position: absolute; inset: -1px;
  transform: translateX(-115%); background: var(--beam); opacity: .82;
  transition: transform .55s cubic-bezier(.2, .8, .2, 1); pointer-events: none;
}
.tn-btn:hover, .tn-icon-btn:hover { transform: translateY(-1px); }
.tn-btn:hover, .tn-icon-btn:hover, .tn-btn:active, .tn-icon-btn:active,
.tn-btn[aria-expanded=true], .tn-icon-btn[aria-expanded=true] {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.tn-btn:hover::before, .tn-icon-btn:hover::before, .tn-btn:active::before, .tn-icon-btn:active::before,
.tn-btn[aria-expanded=true]::before { transform: translateX(115%); }

/* ── Sticky header: two-row desktop, ≤56px collapsed mobile ───────── */
.tn-topbar {
  position: sticky; top: 0; z-index: 50;
  margin: 0 -16px 14px; padding: 0 16px;
  padding-top: env(safe-area-inset-top);
  background: linear-gradient(180deg, rgba(11, 11, 12, .92), rgba(0, 0, 0, .82));
  border-bottom: 1px solid var(--hairline);
  box-shadow: 0 22px 80px rgba(0, 0, 0, .46), inset 0 1px 0 rgba(255, 255, 255, .05);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.tn-topbar-row1 {
  height: var(--header-h);
  display: grid; grid-template-columns: 64px auto minmax(0, 1fr) auto;
  gap: 10px; align-items: center;
}
/* B6: leading slot mirrors the rail column — logo tile centers on the rail-icon axis */
.tn-axis-slot { width: 64px; display: grid; place-items: center; }
.tn-tribe-logo {
  width: 36px; height: 36px; border-radius: 10px; /* tile shrunk ~10%; logo art unchanged */
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 12%, var(--panel-2));
  border: 1px solid var(--hairline);
}
.tn-tribe-logo img { width: 28px; height: 28px; object-fit: contain; }
.tn-brand { display: flex; gap: 10px; align-items: center; min-width: 0; text-decoration: none; }
.tn-mark {
  display: flex; align-items: center; height: 40px; padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--brand) 48%, transparent);
  background: rgba(255, 255, 255, .045);
  font-size: 16px;
}
.tn-current-tribe {
  color: var(--text-dim); font-size: 11px; font-weight: 700;
  font-family: var(--font-mono); letter-spacing: .06em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tn-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }

/* ── B8: second nav row — tc-nav-row-2 grammar (reused from tribecast-com/radar),
   active item keeps the radar-page pill treatment exactly, in --tribe-accent ── */
.tn-topbar-row2 {
  display: block; overflow: hidden; max-height: 48px;
  background: rgba(10, 10, 10, .88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055);
  transition: max-height .28s cubic-bezier(.2, .8, .2, 1), opacity .2s ease;
}
.tn-topbar-row2.closed { max-height: 0; opacity: 0; }
.tn-row2-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 48px; padding: 0 8px; position: relative;
}
.tn-row2-product { display: flex; align-items: center; gap: 10px; }
.tn-row2-product .tn-lt { font-size: 14px; }
.tn-row2-product .tn-pill { margin-left: 0; }
.tn-row2-links {
  display: flex; align-items: center; gap: 6px;
  position: absolute; left: 50%; transform: translateX(-50%);
}
.tn-row2-links a {
  color: #71717a; text-decoration: none;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  padding: 2px 8px; border: 1px solid transparent; border-radius: 4px;
  transition: color .2s;
}
.tn-row2-links a:hover { color: var(--accent); }
.tn-row2-links a.active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-color: color-mix(in srgb, var(--accent) 20%, transparent);
}
.tn-row2-cta {
  color: var(--text-dim); text-decoration: none;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
}
.tn-row2-cta:hover, .tn-row2-cta:active { color: var(--accent); }

/* ── B1/B9: left icon rail — topic glyphs only; collapsible (64px ↔ 200px) ── */
.tn-app { --rail-w: 64px; }
.tn-app.rail-expanded { --rail-w: 200px; }
.tn-main { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); gap: 14px; align-items: start; }
.tn-rail {
  position: sticky; top: calc(var(--header-h) + 12px);
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 6px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--hairline);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .04), 0 16px 48px rgba(0, 0, 0, .55);
}
.tn-rail-chevron {
  width: 28px; height: 28px; margin: 0 auto 4px; border-radius: 8px;
  border: 1px solid var(--hairline); background: rgba(255, 255, 255, .04);
  color: var(--text-dim); cursor: pointer; font-size: 14px; line-height: 1;
}
.tn-rail-chevron:hover, .tn-rail-chevron:active { color: #fff; border-color: var(--accent); }
.tn-app.rail-expanded .tn-rail-chevron { margin-right: 8px; }
.tn-rail-sep { height: 1px; margin: 6px 10px; background: linear-gradient(90deg, transparent, var(--hairline), transparent); }
.tn-rail-link {
  position: relative; display: grid; grid-template-columns: 1fr; place-items: center;
  width: 44px; height: 44px; margin: 0 auto; border-radius: 10px;
  color: var(--text-faint); border-left: 2px solid transparent; text-decoration: none;
}
.tn-rail-link svg { width: 19px; height: 19px; }
.tn-rail-label { display: none; }
.tn-app.rail-expanded .tn-rail-link {
  grid-template-columns: 19px minmax(0, 1fr); gap: 10px; place-items: center start;
  width: 100%; padding: 0 10px;
}
.tn-app.rail-expanded .tn-rail-label {
  display: block; font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tn-rail-link:hover, .tn-rail-link:active { color: #fff; background: rgba(255, 255, 255, .05); }
.tn-rail-link.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); border-left-color: var(--accent); }
.tn-rail-led {
  position: absolute; right: 6px; top: 6px; width: 5px; height: 5px; border-radius: 999px;
  background: transparent;
}
.tn-rail-link.active .tn-rail-led { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.tn-rail-tip {
  position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  padding: 5px 9px; border-radius: 6px; white-space: nowrap; pointer-events: none;
  background: var(--panel-2); border: 1px solid var(--hairline); color: #fff;
  font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em;
  opacity: 0; transition: opacity .12s ease; z-index: 40;
}
.tn-rail-link:hover .tn-rail-tip { opacity: 1; }
.tn-app.rail-expanded .tn-rail-tip { display: none; } /* B9: labels replace tooltips when expanded */

/* ── B6: reusable rollover-reveal tip (megamenu easing ramp: .2s ease, -8px rise) ── */
.tt-host { position: relative; }
.tt-tip {
  position: absolute; left: calc(100% + 10px); top: 50%;
  transform: translateY(-50%) translateY(-8px);
  display: flex; gap: 8px; align-items: center; padding: 8px 12px;
  border-radius: 10px; white-space: nowrap; pointer-events: none; z-index: 45;
  background: linear-gradient(180deg, rgba(16, 16, 18, .96), rgba(6, 6, 7, .98));
  border: 1px solid color-mix(in srgb, var(--brand) 40%, var(--hairline));
  box-shadow: 0 18px 60px rgba(0, 0, 0, .6);
  opacity: 0; transition: opacity .2s ease, transform .2s ease;
}
.tt-host:hover .tt-tip, .tt-host:focus-visible .tt-tip { opacity: 1; transform: translateY(-50%) translateY(0); }
.tt-tip img, .tt-tip .tt-tip-glyph svg { width: 20px; height: 20px; display: block; }
.tt-tip .tt-tip-glyph { color: var(--accent); }
.tt-tip .tn-lt { font-size: 13px; }

/* ── B2: right slide-out drawer (desktop) / full-width menu (mobile) ─ */
.tn-drawer-scrim { position: fixed; inset: 0; z-index: 60; pointer-events: none; background: rgba(0, 0, 0, 0); transition: background .18s ease; }
.tn-drawer-scrim.open { pointer-events: auto; background: rgba(0, 0, 0, .58); }
.tn-nav-drawer {
  position: fixed; top: 0; right: 0; width: min(400px, 94vw); height: 100%;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, var(--panel-2), var(--panel-deep));
  border-left: 1px solid color-mix(in srgb, var(--brand) 55%, transparent);
  box-shadow: -24px 0 80px rgba(0, 0, 0, .56);
  padding: calc(14px + env(safe-area-inset-top)) 16px 18px;
  transform: translateX(105%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.tn-nav-drawer.open { transform: translateX(0); }
.tn-nd-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--hairline-soft); }
.tn-nd-head h2 { margin: 0; font-size: 22px; letter-spacing: -.05em; font-family: var(--font-display); }
.tn-nd-head-actions { display: flex; gap: 6px; }
.tn-nd-anchors { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--hairline-soft); }
.tn-nd-anchors a {
  border: 1px solid var(--hairline); border-radius: 999px; padding: 8px 12px; min-height: 36px;
  color: #fff; text-decoration: none; background: rgba(255, 255, 255, .04);
  font-family: var(--font-mono); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
}
.tn-nd-anchors a:hover, .tn-nd-anchors a:active { border-color: var(--accent); }
.tn-nd-group { padding: 14px 0 4px; }
.tn-nd-eyebrow { font-size: 12px; margin-bottom: 8px; color: var(--text-dim); }
.tn-nd-sub {
  margin: 10px 0 6px; color: var(--text-faint);
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em;
}
.tn-nd-item {
  display: flex; gap: 12px; align-items: center;
  text-decoration: none; color: #fff;
  border: 1px solid var(--hairline-soft); border-radius: 12px;
  background: var(--panel); padding: 10px 12px; min-height: 56px; margin-bottom: 6px;
}
.tn-nd-item:hover, .tn-nd-item:active {
  border-color: var(--accent);
  background: radial-gradient(circle at 100% 0, color-mix(in srgb, var(--accent) 18%, transparent), transparent 48%), var(--panel-2);
}
.tn-nd-ico {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand) 10%, transparent);
}
.tn-nd-ico img { width: 28px; height: 28px; object-fit: contain; }
.tn-nd-body { min-width: 0; flex: 1; }
.tn-nd-top { display: flex; align-items: center; gap: 8px; }
.tn-nd-item .tn-lt { font-size: 14px; font-weight: 600; }
.tn-nd-body small { display: block; color: var(--text-faint); font-size: 11px; margin-top: 2px; line-height: 1.3; }

/* Status pills — LIVE / PREVIEW / PLANNED (TCM canon colors) */
.tn-pill {
  display: inline-flex; align-items: center; margin-left: auto;
  font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 9999px; line-height: 1.2; white-space: nowrap;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08);
}
.tn-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 5px; }
.tn-pill.live { color: #34D399; }
.tn-pill.preview { color: #FF7A29; }
.tn-pill.planned { color: #9CA3AF; }

/* Hamburger */
.tn-hamburger { display: flex; flex-direction: column; gap: 5px; align-items: center; justify-content: center; }
.tn-hamburger span { display: block; width: 18px; height: 2px; background: #fff; transition: transform .22s ease, opacity .18s ease; }
.tn-hamburger[aria-expanded=true] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.tn-hamburger[aria-expanded=true] span:nth-child(2) { opacity: 0; }
.tn-hamburger[aria-expanded=true] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Search: inline desktop, overlay mobile ───────────────────────── */
.tn-search {
  display: flex; min-width: 170px; max-width: 290px; flex: 1 1 210px;
  align-items: center; gap: 5px; padding: 4px;
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px;
  background: rgba(255, 255, 255, .045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.tn-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #fff; padding: 6px 8px; font-size: 13px; font-weight: 700; }
.tn-search input::placeholder { color: rgba(255, 255, 255, .48); }
.tn-search .tn-btn { padding: 7px 10px; }
.tn-search-clear { color: #bbb; }
.tn-search-results { margin: 0 0 20px; }
.tn-search-toggle { display: none; }
.tn-search-overlay {
  position: fixed; inset: 0; z-index: 80; pointer-events: none; opacity: 0;
  background: rgba(0, 0, 0, .78); transition: opacity .18s ease;
  padding: calc(10px + env(safe-area-inset-top)) 14px 0;
}
.tn-search-overlay.open { pointer-events: auto; opacity: 1; }
.tn-search-overlay .tn-search { max-width: none; width: 100%; background: var(--panel-2); border-color: var(--accent); }

/* ── tribeTicker ──────────────────────────────────────────────────── */
.tn-ticker {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: stretch;
  margin: 0 0 16px;
  border: 1px solid var(--hairline); border-radius: var(--radius-card);
  background: var(--panel);
  box-shadow: 0 16px 52px rgba(0, 0, 0, .4); overflow: hidden;
}
/* B6: ticker lead on the rail-column axis — glyph centered, bicolor logotype directly below.
   Width tracks the rail so the axis holds when the rail expands (B9: label grows with it). */
.tn-ticker-lead {
  width: var(--rail-w, 64px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 10px 6px; border-right: 1px solid var(--hairline-soft);
  transition: width .28s cubic-bezier(.2, .8, .2, 1);
}
.tn-ticker-glyph { color: var(--text-dim); }
.tn-ticker-glyph svg { width: 26px; height: 26px; display: block; }
.tn-ticker-lt .tn-lt { font-size: 10px; font-weight: 700; }
.tn-app.rail-expanded .tn-ticker-lt .tn-lt { font-size: 12px; } /* B9: matches expanded rail labels */
.tn-ticker-live { font-family: var(--font-mono); font-size: 8px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .12em; }
.tn-ticker-mask { min-width: 0; overflow: hidden; display: flex; align-items: center; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.tn-ticker-track { display: flex; width: max-content; animation: tnTicker 42s linear infinite; }
.tn-ticker:hover .tn-ticker-track { animation-play-state: paused; }
.tn-ticker-item {
  display: flex; align-items: center; gap: 9px;
  min-width: 390px; max-width: 520px;
  border: 0; border-right: 1px solid var(--hairline-soft);
  background: transparent; color: #fff; padding: 11px 14px; text-align: left; cursor: pointer;
}
.tn-ticker-item b { color: var(--accent); font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.tn-ticker-item .tn-ticker-brk {
  color: #fff; background: var(--led-red); padding: 3px 6px; border-radius: 3px;
  animation: tnBlink 1.6s ease infinite;
}
.tn-ticker-item span:nth-of-type(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.tn-ticker-item em { color: var(--text-faint); font-style: normal; font-size: 11px; white-space: nowrap; font-family: var(--font-mono); }
.tn-ticker-dot { width: 7px; height: 7px; border-radius: 99px; background: var(--dot); box-shadow: 0 0 18px var(--dot); flex: 0 0 auto; }
@keyframes tnBlink { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* ── Stat band: inset bezels + LEDs + mono labels ─────────────────── */
.tn-intro { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 0 0 18px; }
.tn-stat {
  border-radius: 12px; padding: 12px 14px; min-height: 74px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
  background: var(--panel-deep);
  border: 1px solid rgba(255, 255, 255, .04);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .95), 0 1px 1px rgba(255, 255, 255, .03);
}
.tn-stat-head { display: flex; gap: 7px; align-items: center; }
.tn-stat em { font-style: normal; color: var(--accent); text-transform: uppercase; letter-spacing: .11em; font-size: 10px; font-weight: 800; font-family: var(--font-mono); }
.tn-stat b { font-size: clamp(18px, 2.4vw, 26px); letter-spacing: -.04em; color: #fff; font-family: var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Hero zone: lead ~58% + ranked Top-5 + Latest rail ────────────── */
.tn-hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(240px, .75fr) minmax(200px, .6fr); gap: 14px; align-items: stretch; }
.tn-lead { position: relative; cursor: pointer; min-height: 420px; display: flex; }
.tn-lead .tn-media { position: absolute; inset: 0; aspect-ratio: auto; }
.tn-lead-overlay {
  position: relative; z-index: 2; align-self: flex-end; width: 100%;
  padding: 22px;
  background: linear-gradient(to top, rgba(0, 0, 0, .92) 0%, rgba(0, 0, 0, .55) 62%, transparent 100%);
}
.tn-media { aspect-ratio: 4 / 3; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, #0B0B0C), #000); overflow: hidden; position: relative; }
.tn-media img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(1.08) contrast(1.04); transition: transform .3s cubic-bezier(.16, 1, .3, 1); }

.tn-top5 { display: flex; flex-direction: column; padding: 14px; }
.tn-panel-head { display: flex; gap: 8px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--hairline-soft); }
.tn-top5 ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; flex: 1; }
.tn-top5 li { border-bottom: 1px solid var(--hairline-soft); }
.tn-top5 li:last-child { border-bottom: 0; }
.tn-top5 button {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start;
  width: 100%; border: 0; background: transparent; color: #fff;
  text-align: left; padding: 12px 2px; cursor: pointer; min-height: 44px;
}
.tn-rank {
  font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--accent) 75%, #666);
}
.tn-top5 button:hover .tn-rank, .tn-top5 button:active .tn-rank { color: var(--accent); -webkit-text-stroke: 0; }
.tn-top5-title { display: block; font-weight: 750; line-height: 1.25; font-size: 14px; margin-bottom: 5px; }

.tn-latest { display: flex; flex-direction: column; padding: 14px; }
.tn-latest-list { display: flex; flex-direction: column; flex: 1; }
.tn-latest-item {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: center;
  border: 0; border-bottom: 1px solid var(--hairline-soft);
  background: transparent; color: #fff; text-align: left; padding: 10px 0; cursor: pointer; min-height: 44px;
}
.tn-latest-item:last-child { border-bottom: 0; }
.tn-latest-item .tn-media { aspect-ratio: 16 / 11; border-radius: 8px; }
.tn-latest-item b { display: block; font-weight: 750; font-size: 12.5px; line-height: 1.25; margin-bottom: 4px; }
.tn-latest-item .tn-meta { font-size: 10px; }

/* ── Section titles ───────────────────────────────────────────────── */
.tn-section-title { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.tn-section-title h2 { margin: 0; }

/* ── Topic newsblocks: Newsblock-dark register, pagination preserved ─ */
.tn-newsblocks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tn-newsblock { padding: 16px; }
.tn-newsblock-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; margin-bottom: 12px; }
.tn-newsblock-head .tn-kicker { display: flex; gap: 7px; align-items: center; margin-bottom: 7px; }
.tn-newsblock-title { font-size: 18px; margin: 0; }
.tn-pager-chip {
  border: 1px solid var(--hairline); border-radius: 6px; padding: 5px 8px;
  background: var(--panel-deep);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .9);
  white-space: nowrap;
}
.tn-newsblock-lead {
  display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px;
  width: 100%; border: 0; background: transparent; color: #fff;
  text-align: left; padding: 0 0 12px; cursor: pointer;
  border-bottom: 1px solid var(--hairline-soft);
}
.tn-newsblock-lead strong { display: block; font-size: 17px; line-height: 1.2; margin: 6px 0; font-family: var(--font-display); letter-spacing: -.02em; }
.tn-newsblock-image { align-self: start; border-radius: 10px; }
.tn-newsblock-related { display: flex; flex-direction: column; }
.tn-thread-row {
  display: grid; grid-template-columns: auto 56px minmax(0, 1fr); gap: 12px; align-items: center;
  border: 0; border-bottom: 1px solid var(--hairline-soft);
  background: transparent; color: #fff; text-align: left;
  padding: 10px 0; cursor: pointer; min-height: 44px;
}
.tn-thread-row:hover, .tn-thread-row:active { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 60%); }
.tn-thread-num {
  font-family: var(--font-mono); font-weight: 700; font-size: 12px;
  color: color-mix(in srgb, var(--accent) 70%, #888); min-width: 22px;
}
.tn-thread-row .tn-media { aspect-ratio: 1; border-radius: 8px; }
.tn-thread-row .tn-source { display: block; margin-bottom: 3px; font-size: 10px; }
.tn-thread-title { font-weight: 750; line-height: 1.25; font-size: 13.5px; display: block; }
.tn-thread-row .tn-meta { display: block; margin-top: 3px; font-size: 10px; }
.tn-block-more {
  position: relative; overflow: hidden;
  margin-top: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--hairline));
  background: color-mix(in srgb, var(--accent) 14%, rgba(255, 255, 255, .05));
  color: #fff; border-radius: 999px; padding: 10px 13px;
  font-weight: 800; cursor: pointer; min-height: 44px;
  transition: box-shadow .18s ease, border-color .18s ease;
}
.tn-block-more::before {
  content: ""; position: absolute; inset: -1px;
  transform: translateX(-115%); background: var(--beam); opacity: .82;
  transition: transform .55s cubic-bezier(.2, .8, .2, 1); pointer-events: none;
}
.tn-block-more:hover::before, .tn-block-more:active::before { transform: translateX(115%); }
.tn-block-more:hover, .tn-block-more:active { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }

/* ── General river ────────────────────────────────────────────────── */
.tn-river { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tn-story { cursor: pointer; transition: transform .3s cubic-bezier(.16, 1, .3, 1), border-color .3s ease, box-shadow .3s ease; }
.tn-story:hover, .tn-story:active {
  transform: translateY(-4px) scale(1.02);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--hairline));
  box-shadow: 0 12px 30px rgba(0, 0, 0, .7);
}
.tn-story:hover .tn-media img, .tn-story:active .tn-media img { transform: scale(1.05); }
.tn-story .tn-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(11, 11, 12, .85) 0%, rgba(11, 11, 12, .18) 45%, transparent 70%);
}
.tn-story-body { padding: 12px 14px 14px; }
.tn-story h3 { margin: 8px 0; line-height: 1.2; font-size: 15.5px; font-family: var(--font-display); letter-spacing: -.02em; }
.tn-story .tn-summary { font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tn-load { text-align: center; padding: 24px; }
.tn-skeleton, .tn-empty, .tn-error { padding: 36px; text-align: center; color: #ddd; }

/* ── Tribe switcher cards (inside the nav drawer) ─────────────────── */
.tn-tribes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tn-tribe {
  min-height: 84px; border: 1px solid var(--hairline); border-radius: 12px; padding: 12px;
  text-align: left; color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--tribe) 18%, var(--panel-2)), var(--panel-deep));
  cursor: pointer; position: relative; overflow: hidden;
}
.tn-tribe::after { content: ""; position: absolute; inset: auto -20% -55% -20%; height: 88px; background: radial-gradient(circle, color-mix(in srgb, var(--tribe) 38%, transparent), transparent 65%); }
.tn-tribe.active { border-color: var(--tribe); box-shadow: 0 18px 58px color-mix(in srgb, var(--tribe) 17%, transparent); }
.tn-tribe b, .tn-tribe span { position: relative; z-index: 1; display: block; }
.tn-tribe b { font-size: 15px; font-family: var(--font-display); }
.tn-tribe span { margin-top: 6px; color: #bdbdbd; font-size: 11px; font-family: var(--font-mono); }

/* ── Reader ───────────────────────────────────────────────────────── */
.tn-reader { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
.tn-reader.open { pointer-events: auto; background: rgba(0, 0, 0, .78); display: grid; place-items: center; padding: 18px; }
.tn-sheet { width: min(920px, 100%); max-height: 92svh; overflow: auto; background: var(--panel); border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--radius-card); position: relative; }
.tn-close { position: absolute; right: 14px; top: 14px; z-index: 2; background: rgba(0, 0, 0, .8); }
.tn-original { display: inline-flex; margin-top: 14px; color: #fff; text-decoration: none; border-bottom: 1px solid var(--accent); }

/* ── Footer ───────────────────────────────────────────────────────── */
.tn-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-top: 34px; padding: 18px 2px 6px; border-top: 1px solid var(--hairline-soft);
}
.tn-footer .tn-lt { font-size: 15px; }
.tn-footer span { color: var(--text-faint); font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.tn-footer a { color: var(--text-dim); text-decoration: none; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.tn-footer a:hover, .tn-footer a:active { color: var(--accent); }

/* ── Animations ───────────────────────────────────────────────────── */
@keyframes tnCascade { to { opacity: 1; transform: translate(0); } }
@keyframes tnTicker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  .tn-ticker-track, .tn-ticker-brk, .tn-led::after { animation: none !important; opacity: 1; transform: none; }
  .tn-btn::before, .tn-icon-btn::before, .tn-block-more::before { display: none; }
  .tn-tribe, .tn-topbar, .tn-nav-drawer, .tn-rail-tip { transition: none; }
}

/* ── Breakpoints: >1100 desktop · 768–1100 mid · <768 mobile ─────── */
@media (max-width: 1100px) {
  .tn-hero { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .tn-latest { display: none; }
  .tn-intro { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tn-river { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tn-search { min-width: 130px; flex: 0 1 190px; }
}

@media (max-width: 767px) {
  :root { --header-h: 54px; } /* + 1px border = 55px visual, under the 56px gate */
  .tn-app { padding: 0 12px 12px; }
  .tn-topbar { margin: 0 -12px 12px; padding-left: 12px; padding-right: 12px; }
  .tn-topbar.tn-hide { transform: translateY(calc(-100% - 2px)); }
  .tn-topbar-row1 { grid-template-columns: minmax(0, 1fr) auto; }
  .tn-axis-slot, .tn-search-inline, .tn-current-tribe { display: none; }
  /* B8 mobile: row 2 becomes a horizontal scroll strip (command-page variant); product/CTA hidden */
  .tn-row2-inner { height: 44px; justify-content: flex-start; }
  .tn-row2-product, .tn-row2-right { display: none; }
  .tn-row2-links { position: static; transform: none; overflow-x: auto; scrollbar-width: none; width: 100%; }
  .tn-row2-links::-webkit-scrollbar { display: none; }
  .tn-row2-links a { min-height: 32px; display: inline-flex; align-items: center; }
  .tn-search-toggle { display: grid; }
  .tn-mark { height: 38px; padding: 0 10px; font-size: 14px; }
  /* B4: mobile menu = full-width tribecast.com pattern — bigger icon tiles, not a narrow drawer */
  .tn-main { grid-template-columns: 1fr; }
  .tn-rail { display: none; }
  .tn-nav-drawer { width: 100%; border-left: 0; border-top: 1px solid color-mix(in srgb, var(--brand) 40%, transparent); }
  .tn-nd-ico { flex-basis: 56px; width: 56px; height: 56px; border-radius: 14px; }
  .tn-nd-ico img { width: 40px; height: 40px; }
  .tn-nd-item { min-height: 68px; }
  .tn-nd-item .tn-lt { font-size: 16px; }
  .tn-hero { grid-template-columns: 1fr; }
  .tn-lead { min-height: 340px; }
  .tn-latest { display: flex; }
  .tn-intro { grid-template-columns: 1fr 1fr; }
  .tn-newsblocks { grid-template-columns: 1fr; }
  .tn-newsblock-lead { grid-template-columns: 110px minmax(0, 1fr); }
  .tn-river { grid-template-columns: 1fr; }
  .tn-ticker { grid-template-columns: 1fr; }
  .tn-ticker-lead { width: 100%; flex-direction: row; gap: 8px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--hairline-soft); }
  .tn-ticker-glyph svg { width: 18px; height: 18px; }
  .tn-ticker-lead .tt-tip { display: none; }
  .tn-ticker-item { min-width: 300px; }
  .tn-ticker-item em { display: none; }
  .tn-title { font-size: clamp(26px, 7.4vw, 38px); }
  .tn-title, .tn-highlight { line-height: 1.4; } /* keep mobile hero height in check */
}
