/* Spotlight and topic palettes */
:root {
  --spectrum-title: #191534;
  --spectrum-control: #6831d9;
  --spectrum-indigo: #6728d6;
}
html[data-theme="dark"] {
  --spectrum-title: #f3ecff;
  --spectrum-control: #c9b3ff;
}
html[data-theme="light"] body {
  background: radial-gradient(ellipse at 98% 0,#e8d6fa 0,transparent 48rem),radial-gradient(ellipse at 0 16%,#ffe7ee 0,transparent 55rem),var(--bg);
}
html[data-theme="light"] .site-header.teknobu-masthead {
  background: linear-gradient(105deg,#fff1f6,#fbf6ff 47%,#edf0ff);
}
html[data-theme="light"] .site-header .premium-wide-search { border-color: #e6d6fc; background: #fff9ff; }
html[data-theme="light"] .site-header.teknobu-masthead .main-nav a.active { background: #eee0ff; border-color: #e1cdf9; }
html[data-theme="light"] .site-header.teknobu-masthead .main-nav a.active .teknobu-premium-icon {
  background: linear-gradient(140deg,#a35af8,#6733da);
}

.premium-home-grid { grid-template-columns: minmax(0,1fr) clamp(330px,32%,450px); }
html[data-theme="light"] .premium-home-grid .reference-lead {
  background: #eee0fd; border-color: #dacaf8;
  box-shadow: 0 8px 23px #8364bc24;
}
html[data-theme="light"] .reference-lead .featured-slide::after {
  background: radial-gradient(ellipse at 100% 5%,#aba2ff34,transparent 62%),
    linear-gradient(96deg,#fff5fc 1%,#f8effffd 29%,#f1e6ffdf 46%,#c5adff25 73%,transparent 96%),
    linear-gradient(0deg,#e8dafaeb,transparent 30%);
}
html[data-theme="light"] .reference-lead .featured-cta {
  background: linear-gradient(110deg,#aa52f0,#6232d8);
  box-shadow: 0 6px 14px #793cdc43;
}
html[data-theme="light"] .reference-lead .featured-kicker { background: linear-gradient(110deg,#7135e1,#503acb); }
html[data-theme="light"] .premium-home-grid .premium-feed-card {
  background: linear-gradient(130deg,#fff,#f5edff);
}
.premium-home-grid .premium-feed-card { border-radius: 13px; }
.premium-home-grid .premium-feed-cover { border-radius: 9px; }
html[data-theme="light"] .premium-home-grid .premium-feed-foot a { background: #eee3ff; color: #5626b0; }

.sidebar-box.premium-trend-box,.sidebar-box.premium-categories-box {
  border-radius: 19px;
  padding: 13px;
}
html[data-theme="light"] .premium-home-grid > aside :is(.premium-trend-box,.premium-categories-box) {
  background: linear-gradient(145deg,#faf1ff,#f8f8ff 67%);
  border-color: #fff9ff;
  box-shadow: 0 9px 18px #805abf23;
}
.premium-trend-box .premium-side-heading,.premium-categories-box .premium-side-heading {
  border-bottom: 0; padding-bottom: 4px; margin-bottom: 9px;
}
.premium-side-heading .sidebar-title { font-weight: 800; letter-spacing: -.055em; }
.premium-trend-box .premium-side-heading .premium-side-icon.is-trend {
  background: linear-gradient(140deg,#ff777d,#ed2d45); color: #fff;
}
.premium-categories-box .premium-side-heading .premium-side-icon.is-category {
  background: linear-gradient(130deg,#35ceff,#2546e4); color: #fff;
}
html[data-theme="light"] .premium-all-link { color: #fff; font-weight: 800; background: linear-gradient(135deg,#a36cf7,#6a37e5); }

.premium-trend-box .trend-list { gap: 9px; }
.sidebar-box.premium-trend-box .trend-card,
html[data-theme="light"] .premium-home-grid .sidebar-box.premium-trend-box .trend-card {
  --trend-card-bg: linear-gradient(112deg,#3c075a,#250d6c 47%,#702ddd);
  --trend-ink: #fff;
  --trend-soft: #f1dbff;
  --trend-chip: #762cbd;
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(94px,37%) minmax(0,1fr);
  min-height: 109px; align-items: stretch; padding: 0; gap: 0;
  border-radius: 12px; border: 1px solid #ffffff65;
  color: var(--trend-ink); background: var(--trend-card-bg);
  box-shadow: 0 5px 12px #2c175b26;
}
.sidebar-box.premium-trend-box .trend-card:nth-child(3n+2),
html[data-theme="light"] .premium-home-grid .sidebar-box.premium-trend-box .trend-card:nth-child(3n+2) {
  --trend-card-bg: linear-gradient(112deg,#adc8f0,#e3f1ff 45%,#85caff);
  --trend-ink: #0d2250;
  --trend-soft: #294979;
  --trend-chip: #1563bb;
}
.sidebar-box.premium-trend-box .trend-card:nth-child(3n+3),
html[data-theme="light"] .premium-home-grid .sidebar-box.premium-trend-box .trend-card:nth-child(3n+3) {
  --trend-card-bg: linear-gradient(112deg,#f384c8,#ffe5f5 50%,#ffc191);
  --trend-ink: #301332;
  --trend-soft: #5b355e;
  --trend-chip: #a72569;
}
.sidebar-box.premium-trend-box .trend-card:is(:hover,:focus-visible) { transform: none; border-color: #975ff4; box-shadow: 0 6px 15px #7247b655; }
.sidebar-box.premium-trend-box .trend-card .premium-trend-image { width: 100%; align-self: stretch; min-width: 0; }
.sidebar-box.premium-trend-box .trend-card .premium-trend-thumb {
  width: 100%; height: 100%; min-height: 105px; aspect-ratio: auto; border-radius: 0;
  background: color-mix(in srgb,var(--trend-chip) 64%,#322b72);
}
.sidebar-box.premium-trend-box .trend-card .premium-trend-thumb img { object-fit: cover; }
.sidebar-box.premium-trend-box .trend-card .trend-rank {
  inset: 7px auto auto 7px; background: #2b2947db; border: 0; color: #fff; border-radius: 6px;
}
.sidebar-box.premium-trend-box .trend-card:first-child .trend-rank { background: #ffbd39; color: #352006; }
.sidebar-box.premium-trend-box .trend-card .premium-trend-copy {
  position: relative; z-index: 2; align-self: center; padding: 8px 24px 8px 10px; min-width: 0;
}
.sidebar-box.premium-trend-box .trend-card .premium-trend-copy strong {
  color: var(--trend-ink); font-size: clamp(12px,1.2vw,16px); font-weight: 800; line-height: 1.25; margin-top: 4px;
}
.sidebar-box.premium-trend-box .premium-trend-meta { color: var(--trend-soft); gap: 4px; font-size: 9.5px; }
.premium-trend-meta svg { width: 12px; height: 12px; }
.sidebar-box.premium-trend-box .premium-category-badge {
  display: inline-flex; align-items: center; max-width: 100%; gap: 4px;
  padding: 3px 6px; color: #fff; background: var(--trend-chip); line-height: 1;
  text-transform: none; border-radius: 999px; font-size: 9px;
}
.premium-category-badge .teknobu-premium-icon { width: 12px; height: 12px; color: inherit; background: transparent; }
.premium-category-badge .teknobu-premium-icon svg { width: 11px; height: 11px; }
.spectrum-trend-decoration { position: absolute; inset: 10px 9px auto auto; opacity: .22; pointer-events: none; color: var(--trend-ink); }
.spectrum-trend-decoration .teknobu-premium-icon { background: transparent; color: inherit; width: 33px; height: 33px; }
.spectrum-trend-decoration svg { width: 28px; height: 28px; }
.sidebar-box.premium-trend-box .trend-card .premium-trend-arrow {
  display: grid; place-items: center; position: absolute; inset: auto 6px 6px auto;
  width: 23px; height: 23px; border-radius: 50%; color: var(--trend-ink); background: #ffffff46;
}
.sidebar-box.premium-trend-box .premium-trend-arrow svg { width: 13px; height: 13px; }

.premium-categories-box .category-pills { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.premium-categories-box .category-pills .pill {
  --topic-ink: #4e2baf;
  --topic-bg: #eee3ff;
  position: relative; min-width: 0; min-height: 65px;
  display: grid; justify-items: start; align-content: center; gap: 4px;
  padding: 7px; border-radius: 10px;
  background: var(--topic-bg); color: #1d1835; border: 1px solid #ffffff6e;
}
.premium-categories-box .pill[data-topic="hardware"],.premium-categories-box .pill[data-topic="app"],.premium-categories-box .pill[data-topic="news"] { --topic-ink: #125cb1; --topic-bg: #dfedff; }
.premium-categories-box .pill[data-topic="code"],.premium-categories-box .pill[data-topic="shield"] { --topic-ink: #087250; --topic-bg: #dbf6ec; }
.premium-categories-box .pill[data-topic="mobile"],.premium-categories-box .pill[data-topic="social"] { --topic-ink: #ac266d; --topic-bg: #ffe0f1; }
.premium-categories-box .pill[data-topic="guide"] { --topic-ink: #ad4b15; --topic-bg: #ffeadc; }
.premium-categories-box .category-pills .pill:hover { border-color: var(--topic-ink); color: var(--topic-ink); }
.premium-categories-box .category-pills .teknobu-premium-icon { color: var(--topic-ink); background: transparent; width: 25px; height: 23px; }
.premium-categories-box .category-pills .teknobu-premium-icon svg { width: 23px; height: 23px; }
.spectrum-category-name { font-size: clamp(10px,1.03vw,13px); overflow-wrap: anywhere; line-height: 1.2; }
.premium-categories-box .premium-category-count {
  position: absolute; inset: 5px 5px auto auto; min-width: 17px; padding: 1px 3px;
  font-size: 9px; color: var(--topic-ink);
  background: color-mix(in srgb,var(--topic-ink) 13%,var(--topic-bg));
}

@media(max-width:1024px) { .premium-home-grid { grid-template-columns: minmax(0,1fr); } }
@media(max-width:760px) {
  .sidebar-box.premium-trend-box,.sidebar-box.premium-categories-box { padding: 9px; }
  .sidebar-box.premium-trend-box .trend-card .premium-trend-copy strong { font-size: 13px; }
  .spectrum-category-name { font-size: 11px; }
}

.sidebar-box.premium-trend-box .trend-card .premium-trend-image { position: relative; }
.sidebar-box.premium-trend-box .trend-card .premium-trend-thumb { position: absolute; inset: 0; min-height: 0; }
html[data-theme="light"] .main-nav :is(.current-menu-item,.current_page_item,.current-menu-ancestor) > a { color: #5426a6; }

.premium-trend-box .premium-all-link {
  display: inline-flex; align-items: center; gap: 4px;
}
.premium-trend-box .premium-all-link svg { width: 12px; height: 12px; }

.sidebar-box.premium-trend-box .trend-card {
  --trend-light: #e75dff;
  --rank-light: #ffdc59;
  --rank-dark: #ed8a13;
}
.sidebar-box.premium-trend-box .trend-card:nth-child(3n+2) {
  --trend-light: #24afff;
  --rank-light: #a5bde8;
  --rank-dark: #4e619f;
}
.sidebar-box.premium-trend-box .trend-card:nth-child(3n+3) {
  --trend-light: #ff6fbb;
  --rank-light: #ffc370;
  --rank-dark: #dc671f;
}
.sidebar-box.premium-trend-box .trend-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 18% 90%,var(--trend-light),transparent 55%),
    radial-gradient(ellipse at 97% 104%,var(--trend-light),transparent 37%);
  opacity: .48;
}
.sidebar-box.premium-trend-box .trend-card::after {
  content: ""; position: absolute; inset: auto -12% -60% 16%; height: 80%;
  border: 1px solid color-mix(in srgb,var(--trend-light),white 35%);
  border-radius: 50%; transform: rotate(-14deg); pointer-events: none;
  box-shadow: 0 -3px 17px var(--trend-light), inset 0 2px 18px var(--trend-light);
  opacity: .55;
}
.sidebar-box.premium-trend-box .trend-card .premium-trend-thumb {
  width: 128%; background: transparent;
  mask-image: linear-gradient(90deg,#000 42%,#000d 64%,transparent 100%);
}
.sidebar-box.premium-trend-box .trend-card:nth-child(3n+2) .premium-trend-thumb {
  mix-blend-mode: multiply;
}
.sidebar-box.premium-trend-box .trend-card .trend-rank {
  width: 25px; height: 33px; inset: 13px auto auto 8px; z-index: 3;
  display: grid; place-items: center; font-size: 16px; line-height: 1;
  border-radius: 5px 5px 7px 7px; color: #fff;
  background: linear-gradient(150deg,var(--rank-light),var(--rank-dark) 62%);
  text-shadow: 0 1px 2px #18102d83; box-shadow: 0 3px 10px #1e104946;
}
.sidebar-box.premium-trend-box .trend-card .trend-rank svg {
  position: absolute; top: -11px; width: 20px; height: 17px;
  color: #ffe267; filter: drop-shadow(0 1px 2px #8e4b1b);
}
.sidebar-box.premium-trend-box .trend-card .premium-trend-copy { padding: 8px 29px 8px 8px; }
.sidebar-box.premium-trend-box .trend-card .premium-trend-copy strong {
  font-size: clamp(13px,1.05vw,15px); line-height: 1.19; letter-spacing: -.025em;
}
.trend-labels { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.trend-views {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 5px;
  background: #ffffff42; color: var(--trend-ink); border-radius: 999px;
  font-size: 9px; font-weight: 700; line-height: 1.2;
}
.trend-views svg { width: 12px; height: 12px; }
.spectrum-trend-decoration { z-index: 1; color: var(--trend-ink); opacity: .27; }
.sidebar-box.premium-trend-box .trend-card .premium-trend-arrow {
  z-index: 3; width: 26px; height: 26px;
  background: color-mix(in srgb,var(--trend-light) 32%,white);
  color: var(--trend-chip); box-shadow: 0 2px 8px #17122d31;
}
