/* INTEL // DEEP FEED — see static/js/intel.js. Builds on hub.css (tokens,
   .hub-panel brackets, .hud-btn). No backdrop-filter / looping animations:
   lots of image cards here, keep repaints cheap. */
body.intel-on .wrap { max-width: 1480px; }
.intel { position: relative; }
.intel::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 60% 40% at 15% 10%, rgba(255, 176, 32, .10), transparent 70%),
    radial-gradient(ellipse 50% 40% at 85% 70%, rgba(79, 227, 255, .08), transparent 70%),
    radial-gradient(ellipse 40% 30% at 60% 15%, rgba(122, 58, 255, .07), transparent 70%); }

.it-head { display: flex; align-items: center; gap: 12px; padding: 10px 12px; flex-wrap: wrap; margin-bottom: 14px; }
.it-sub { color: var(--holo); }
.it-sync { font: 11px var(--mono); color: var(--mute); display: flex; align-items: center; gap: 6px; }
.it-dot { width: 7px; height: 7px; border-radius: 50%; background: #7dff9a; box-shadow: 0 0 8px #7dff9a; display: inline-block; }
#it-search { flex: 1 1 220px; max-width: 420px; margin-left: auto; font-family: var(--mono); background: rgba(0, 0, 0, .35); border-color: #1d2a36; padding: 8px 10px; position: relative; z-index: 3; }
#it-search:focus { border-color: var(--holo); box-shadow: 0 0 12px rgba(79, 227, 255, .25); }
#it-refresh { position: relative; z-index: 3; }
.it-h { display: flex; align-items: baseline; gap: 12px; margin: 18px 2px 10px; }
.it-h b { font: 800 12px var(--mono); letter-spacing: .3em; color: var(--amber); text-shadow: 0 0 12px var(--glow); }
.it-h span { font: 11px var(--mono); color: var(--mute); }
.it-empty { color: var(--mute); font: 12px var(--mono); padding: 14px 4px; }

/* ---- patch deck ------------------------------------------------------------ */
.it-patches { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.it-card { --c: var(--holo); overflow: hidden; display: flex; flex-direction: column; border-color: color-mix(in srgb, var(--c) 35%, transparent); }
.it-card::before { background:
    linear-gradient(var(--c), var(--c)) top left / 16px 2px no-repeat, linear-gradient(var(--c), var(--c)) top left / 2px 16px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 16px 2px no-repeat, linear-gradient(var(--c), var(--c)) top right / 2px 16px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 16px 2px no-repeat, linear-gradient(var(--c), var(--c)) bottom left / 2px 16px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 16px 2px no-repeat, linear-gradient(var(--c), var(--c)) bottom right / 2px 16px no-repeat; }
.it-card.new { box-shadow: 0 0 0 1px var(--c), 0 0 26px color-mix(in srgb, var(--c) 35%, transparent); }
.itc-art { position: relative; height: 120px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 30%, #05070c), #05070c 70%); overflow: hidden; }
.itc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.itc-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(7, 10, 18, .92)); }
.itc-head { position: absolute; left: 12px; right: 12px; bottom: 8px; display: flex; align-items: center; gap: 8px; z-index: 3; }
.it-card > .itc-head { position: static; padding: 12px; }
.itc-head b { font: 800 13px var(--mono); letter-spacing: .08em; text-transform: uppercase; text-shadow: 0 1px 4px #000; }
.itc-i { font-size: 20px; filter: drop-shadow(0 0 6px var(--c)); }
.itc-new { margin-left: auto; font: 900 10px var(--mono); letter-spacing: .15em; color: #04121a; background: var(--c); padding: 3px 7px; border-radius: 3px; box-shadow: 0 0 12px var(--c); }
.itc-stale { margin-left: auto; font: 10px var(--mono); color: var(--mute); border: 1px solid #333; padding: 2px 6px; border-radius: 3px; }
.itc-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; position: relative; z-index: 3; flex: 1; }
.itc-title { color: var(--text); font-weight: 700; font-size: 14px; line-height: 1.3; text-decoration: none; }
.itc-title:hover { color: var(--c); }
.itc-meta { font: 10px var(--mono); color: var(--mute); }
.itc-sum { font-size: 12px; color: #b8c6d2; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.itc-acts { display: flex; gap: 8px; align-items: center; margin-top: auto; padding-top: 4px; }
.itc-read { font: 800 11px var(--mono); letter-spacing: .1em; color: var(--c); text-decoration: none; border: 1px solid var(--c); padding: 6px 9px; border-radius: 4px; }
.itc-read:hover { background: color-mix(in srgb, var(--c) 18%, transparent); }
.itc-more { margin-left: auto; background: none; color: var(--mute); font: 700 10px var(--mono); letter-spacing: .1em; padding: 6px 4px; }
.itc-more:hover { color: var(--text); filter: none; }
.itc-hist { list-style: none; margin: 4px 0 0; padding: 6px 0 0; border-top: 1px solid rgba(79, 227, 255, .1); display: flex; flex-direction: column; gap: 6px; }
.itc-hist li { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.itc-hist a { color: #cfe0ec; text-decoration: none; }
.itc-hist a:hover { color: var(--c); }
.itc-hist span { font: 10px var(--mono); color: var(--mute); white-space: nowrap; }

/* ---- channels + news --------------------------------------------------------- */
.it-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.it-chips button { background: rgba(79, 227, 255, .04); color: #b8c6d2; border: 1px solid #1d2a36; font: 700 11px var(--mono); letter-spacing: .06em; padding: 7px 11px; border-radius: 20px; }
.it-chips button i { font-style: normal; color: var(--mute); margin-left: 4px; }
.it-chips button:hover { border-color: var(--holo); filter: none; }
.it-chips button.on { color: #04121a; background: var(--holo); border-color: var(--holo); box-shadow: 0 0 14px rgba(79, 227, 255, .35); }
.it-chips button.on i { color: #04324a; }
.it-news { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); grid-auto-rows: 190px; gap: 10px; }
.it-story { position: relative; overflow: hidden; padding: 0; text-align: left; border-radius: 6px; border: 1px solid rgba(79, 227, 255, .14);
  background: linear-gradient(135deg, #0d1624, #070a12); color: var(--text); font-weight: 400; display: block; transition: border-color .15s, transform .15s; }
.it-story:hover, .it-story:focus-visible { border-color: var(--amber); transform: translateY(-2px); filter: none; outline: none; }
.it-story:active { transform: scale(.99); }
.it-story.hero { grid-column: span 2; grid-row: span 2; }
.its-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.it-story:hover .its-img { transform: scale(1.04); }
.its-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 7, 12, .1) 0%, rgba(5, 7, 12, .55) 45%, rgba(5, 7, 12, .96) 100%); }
.it-story.noimg .its-shade { background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .02) 0 1px, transparent 1px 3px), radial-gradient(circle at 80% 0%, rgba(79, 227, 255, .14), transparent 60%); }
.its-tag { position: absolute; top: 8px; left: 8px; font: 700 10px var(--mono); letter-spacing: .08em; background: rgba(5, 7, 12, .8); color: var(--holo); border: 1px solid var(--holo-dim); padding: 3px 7px; border-radius: 3px; }
.it-story[data-ch="gaming"] .its-tag { color: var(--amber); border-color: rgba(255, 176, 32, .35); }
.it-story[data-ch="anime"] .its-tag { color: #ff9ad0; border-color: rgba(255, 154, 208, .35); }
.it-story[data-ch="history"] .its-tag { color: #e0c890; border-color: rgba(224, 200, 144, .35); }
.it-story[data-ch="science"] .its-tag { color: #7dff9a; border-color: rgba(125, 255, 154, .3); }
.it-story[data-ch="movies"] .its-tag { color: #ff8a7a; border-color: rgba(255, 138, 122, .35); }
.it-story[data-ch="scifi"] .its-tag { color: #b8a0ff; border-color: rgba(184, 160, 255, .35); }
.its-text { position: absolute; left: 12px; right: 12px; bottom: 10px; display: flex; flex-direction: column; gap: 5px; }
.its-text b { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 6px #000; }
.it-story.hero .its-text b { font-size: 22px; -webkit-line-clamp: 3; }
.its-text em { font-style: normal; font-size: 13px; color: #c8d4de; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.its-text small { font: 10px var(--mono); color: #8fa6b6; }
.it-more-row { display: flex; justify-content: center; margin: 14px 0; }
.it-more { font: 700 11px var(--mono); letter-spacing: .2em; padding: 9px 18px; }
.it-more.hidden, .it-reader.hidden { display: none; }
.it-twitch { margin-top: 12px; }
.it-twitch summary { cursor: pointer; list-style: none; }
.it-twitch > div { padding: 0 12px 12px; position: relative; z-index: 3; }

/* ---- reader ---------------------------------------------------------------------- */
.it-reader { position: fixed; top: 44px; right: 0; bottom: var(--nav-h, 48px); width: min(460px, 100%); z-index: 40; overflow: auto; padding: 14px;
  background: rgba(6, 9, 16, .97); border-left: 1px solid var(--holo); box-shadow: -20px 0 50px rgba(0, 0, 0, .6); animation: drawer .22s ease-out; }
.itr-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; font: 700 11px var(--mono); letter-spacing: .1em; color: var(--holo); margin-bottom: 12px; }
.itr-bar span:last-child { display: flex; gap: 6px; }
.itr-img { width: 100%; max-height: 240px; object-fit: cover; border-radius: 6px; border: 1px solid var(--holo-dim); }
.it-reader h3 { font-size: 20px; line-height: 1.3; margin: 12px 0 6px; }
.itr-meta { font: 11px var(--mono); color: var(--mute); margin-bottom: 12px; }
.it-reader p { font-size: 14px; line-height: 1.6; color: #d0dbe4; }
.itr-open { display: inline-block; margin-top: 16px; font: 800 12px var(--mono); letter-spacing: .12em; color: #04121a; background: linear-gradient(135deg, var(--holo), #3a7aff);
  padding: 10px 14px; border-radius: 6px; text-decoration: none; }

/* OPS comms: patch lines */
.cm.g-intel .cm-x { color: #b8d8ff; }

@media (max-width: 820px) {
  .it-head .hud-brand { flex: 1 0 auto; }
  #it-search { max-width: none; margin-left: 0; order: 3; flex-basis: 100%; }
  .it-patches { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
  .it-patches::-webkit-scrollbar { display: none; }
  .it-patches > .it-card { flex: 0 0 82%; scroll-snap-align: start; }
  .it-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .it-chips button { flex: 0 0 auto; }
  .it-news { grid-template-columns: 1fr; grid-auto-rows: 170px; }
  .it-story.hero { grid-column: auto; grid-row: span 2; }
}
