/* ==========================================================================
   News page – scoped to .news-page so no other page is affected.
   Tokens match the existing blog page palette.
   ========================================================================== */
.news-page {
  --n-primary: #5b3ff0; --n-primary-dark: #4a2fd6; --n-soft: #efeaff;
  --n-ink: #14123a; --n-muted: #6b6a8c; --n-line: #e7e3fa;
  background: linear-gradient(180deg, #f5f2ff 0%, #fbfaff 35%, #f3efff 100%);
}

/* Typography applies to the news content only, so the shared header/footer keep their look. */
.news-page #news-main { font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--n-ink); }

/* Header markup is untouched; on this light page it needs the same brand
   gradient the footer uses so its white nav text stays readable. */
.news-page #main-header { background: linear-gradient(to bottom right, #9333ea, #7e22ce, #2563eb) !important; }

.news-page .n-wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 1024px) { .news-page .n-wrap { padding: 0 32px; } }
.news-page .no-scrollbar::-webkit-scrollbar { display: none; }
.news-page .no-scrollbar { scrollbar-width: none; }
.news-page .clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-page .clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-page #news-main a { text-decoration: none; }
#news-main a:focus-visible, #news-main button:focus-visible, #news-main input:focus-visible, #news-main select:focus-visible {
  outline: 2px solid var(--n-primary); outline-offset: 2px;
}
.news-page #news-main [hidden] { display: none !important; }
.news-page #news-main svg.lucide { width: 1em; height: 1em; flex: none; }

/* ---------- Hero ---------- */
.n-hero { position: relative; overflow: hidden; padding: 148px 0 40px;
  background: radial-gradient(60% 80% at 85% 20%, #e6defd 0%, transparent 70%), linear-gradient(180deg, #f1edff 0%, #f8f6ff 100%); }
.n-blob { position: absolute; border-radius: 50%; pointer-events: none; }
.n-blob-a { width: 340px; height: 340px; right: 26%; top: 70px; background: radial-gradient(circle, rgba(139,92,246,.22), transparent 70%); }
.n-blob-b { width: 420px; height: 420px; left: -160px; bottom: -220px; background: radial-gradient(circle, rgba(91,63,240,.16), transparent 70%); }
.n-hero-grid { position: relative; display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; }
@media (min-width: 900px) { .n-hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); } }

.n-crumbs { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--n-muted); margin-bottom: 22px; }
.n-crumbs a { color: var(--n-muted); } .n-crumbs a:hover { color: var(--n-primary); }
.n-crumbs span { color: var(--n-ink); font-weight: 500; }
.n-h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); line-height: 1.15; font-weight: 800; letter-spacing: -.025em; color: var(--n-ink); margin: 0; }
.n-h1 span { display: block; color: var(--n-primary); }
.n-lead { margin: 18px 0 26px; max-width: 600px; font-size: 1.125rem; line-height: 1.625; color: var(--n-muted); }

.n-search { display: flex; align-items: center; gap: 10px; max-width: 640px; background: #fff; border: 1px solid var(--n-line);
  border-radius: 999px; padding: 7px 7px 7px 20px; box-shadow: 0 12px 32px -14px rgba(91,63,240,.35); }
.n-search:focus-within { border-color: var(--n-primary); }
.n-search-ic { color: var(--n-muted); font-size: 18px; }
.n-search input { flex: 1; min-width: 0; border: 0; outline: 0 !important; background: transparent; font: inherit; font-size: .9rem; color: var(--n-ink); padding: 8px 0; }
.n-search input::placeholder { color: #8b8aa8; }
.n-search input::-webkit-search-cancel-button { display: none; }
.n-search-clear { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 0; background: var(--n-soft); color: var(--n-primary); cursor: pointer; }
.n-search-go { width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--n-primary); color: #fff; cursor: pointer; transition: background .2s; font-size: 18px; }
.n-search-go:hover { background: var(--n-primary-dark); }

.n-hero-art { position: relative; display: none; min-height: 330px; }
@media (min-width: 900px) { .n-hero-art { display: block; } }
.n-hero-photo { position: absolute; right: 4%; bottom: -40px; height: 112%; width: auto; max-width: 70%; object-fit: contain; z-index: 1; }
.n-tablet { position: absolute; left: 8%; top: 58px; width: 52%; padding: 22px 24px; border-radius: 20px; transform: perspective(700px) rotateY(14deg) rotateX(4deg) rotate(-5deg);
  background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(226,218,255,.8)); border: 1px solid #fff; box-shadow: 0 30px 50px -24px rgba(91,63,240,.5); }
.n-tablet b { display: block; font-size: 1.7rem; font-weight: 800; letter-spacing: -.01em; color: var(--n-primary); margin-bottom: 12px; transform: rotate(-4deg); }
.n-tablet i { display: block; height: 14px; border-radius: 7px; background: #e6e0fb; margin-top: 10px; }
.n-tablet i:nth-of-type(2) { width: 82%; } .n-tablet i:nth-of-type(3) { width: 60%; }
.n-chip { position: absolute; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 96px; padding: 12px 8px; text-align: center;
  background: #fff; border: 1px solid var(--n-line); border-radius: 14px; box-shadow: 0 14px 30px -14px rgba(91,63,240,.45);
  font: inherit; font-size: .64rem; font-weight: 500; line-height: 1.2; color: var(--n-ink); cursor: pointer; transition: transform .2s, border-color .2s; }
.n-chip:hover { transform: translateY(-3px); border-color: var(--n-primary); }
.n-chip svg { width: 26px; height: 26px; color: var(--n-primary); }
.n-chip-1 { left: 0; top: 0; } .n-chip-2 { right: 0; top: 56px; }
.n-chip-3 { left: 22%; bottom: 8px; } .n-chip-4 { right: 0; bottom: -4px; }

/* ---------- Tabs ---------- */
.n-tabs-wrap { margin: 18px 0 26px; }
.n-tabs { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; scroll-snap-type: x proximity; }
.n-tab { scroll-snap-align: start; flex: none; display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 12px;
  background: #fff; border: 1px solid var(--n-line); color: var(--n-ink); font: inherit; font-size: .8rem; font-weight: 600; white-space: nowrap; cursor: pointer;
  box-shadow: 0 6px 16px -12px rgba(91,63,240,.5); transition: border-color .2s, background .2s, color .2s; }
.n-tab:hover { border-color: var(--n-primary); }
.n-tab-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--n-soft); color: var(--n-primary); font-size: 15px; }
.n-tab[aria-selected="true"] { background: var(--n-primary); border-color: var(--n-primary); color: #fff; }
.n-tab[aria-selected="true"] .n-tab-ic { background: rgba(255,255,255,.18); color: #fff; }

/* ---------- Cards, buttons, shared ---------- */
.n-card { background: #fff; border: 1px solid var(--n-line); border-radius: 18px; box-shadow: 0 10px 30px -18px rgba(91,63,240,.3); }
.n-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border: 0; border-radius: 12px; background: var(--n-primary);
  color: #fff; font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; transition: background .2s; }
.n-btn:hover { background: var(--n-primary-dark); }
.n-tag { display: inline-block; font-size: .72rem; font-weight: 600; color: var(--n-primary); background: var(--n-soft); padding: 3px 9px; border-radius: 7px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n-meta { display: flex; align-items: center; gap: 8px; font-size: .72rem; color: var(--n-muted); min-width: 0; }
.n-meta span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.n-meta span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n-meta .n-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; flex: none; }
.n-go { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--n-line);
  color: var(--n-primary); box-shadow: 0 6px 14px -8px rgba(91,63,240,.5); transition: background .2s, color .2s; font-size: 16px; }
a:hover > .n-go, a:hover .n-go { background: var(--n-primary); color: #fff; }
.n-round { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--n-line); background: #fff; color: var(--n-primary); cursor: pointer; font-size: 17px; transition: background .2s, color .2s; }
.n-round:hover:not(:disabled) { background: var(--n-primary); color: #fff; }
.n-round:disabled { opacity: .4; cursor: not-allowed; }
.n-h2 { font-size: clamp(1.75rem, 3.2vw, 2.25rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.25; margin: 0; }
.n-section { margin-top: 44px; }
.n-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.n-arrows { display: flex; gap: 8px; }
.n-thumb { display: block; width: 100%; height: 100%; object-fit: cover; background: #ece8fb; }

/* ---------- Top: slider + side ---------- */
.n-top { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 1024px) { .n-top { grid-template-columns: minmax(0, 1fr) 380px; } }
.n-slider { position: relative; overflow: hidden; min-height: 360px; border-radius: 18px; background: #1c1457; box-shadow: 0 24px 50px -26px rgba(40,20,160,.7); }
@media (min-width: 640px) { .n-slider { min-height: 392px; } }
.n-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .5s, visibility .5s; }
.n-slide.is-on { opacity: 1; visibility: visible; }
.n-slide > .n-thumb { position: absolute; inset: 0; }
.n-slide::before { content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(27,18,98,.96) 0%, rgba(54,36,168,.82) 48%, rgba(70,48,200,.25) 100%); }
@media (max-width: 639px) { .n-slide::before { background: linear-gradient(180deg, rgba(27,18,98,.55) 0%, rgba(27,18,98,.95) 70%); } }
.n-slide-body { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 14px;
  padding: 36px 28px 56px; max-width: 640px; color: #fff; }
@media (min-width: 640px) { .n-slide-body { padding: 36px 72px 56px; } }
.n-slide-src { font-size: .8rem; font-weight: 600; color: #cfc6ff; display: flex; align-items: center; gap: 8px; }
.n-pill { display: inline-block; padding: 5px 14px; border-radius: 999px; background: #fff; color: var(--n-primary); font-size: .75rem; font-weight: 600; }
.n-slide h3 { margin: 0; font-size: clamp(1.4rem, 3vw, 2.15rem); line-height: 1.15; font-weight: 800; letter-spacing: -.015em; }
.n-slide p { margin: 0; color: #ded8ff; font-size: .95rem; line-height: 1.5; }
.n-slide .n-btn { background: var(--n-primary); box-shadow: 0 12px 24px -10px rgba(0,0,0,.5); border-radius: 999px; padding: 12px 22px; }
.n-slide .n-btn:hover { background: #6d52ff; }
.n-sl-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 0; cursor: pointer; font-size: 20px; }
.n-sl-prev { left: 14px; background: rgba(255,255,255,.35); color: #fff; backdrop-filter: blur(4px); }
.n-sl-next { right: 14px; background: #fff; color: var(--n-primary); }
@media (max-width: 639px) { .n-sl-arrow { top: auto; bottom: 10px; transform: none; width: 36px; height: 36px; } .n-sl-prev { left: auto; right: 58px; } }
.n-dots { position: absolute; z-index: 3; left: 28px; bottom: 22px; display: flex; gap: 8px; }
@media (min-width: 640px) { .n-dots { left: 72px; } }
.n-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: rgba(255,255,255,.45); cursor: pointer; transition: width .25s, background .25s; }
.n-dots button[aria-current="true"] { width: 24px; background: #fff; }

.n-side { padding: 20px; display: flex; flex-direction: column; }
.n-side-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.n-seg { display: inline-flex; gap: 4px; padding: 3px; background: var(--n-soft); border-radius: 10px; }
.n-seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font: inherit; font-size: .9rem; font-weight: 700; color: var(--n-muted); cursor: pointer; }
.n-seg button[aria-selected="true"] { background: #fff; color: var(--n-ink); box-shadow: 0 2px 8px -3px rgba(91,63,240,.4); }
.n-viewall { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--n-line); background: #fff; color: var(--n-primary); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .72rem; font-weight: 600; cursor: pointer; }
.n-viewall:hover { background: var(--n-soft); }
.n-rows { display: flex; flex-direction: column; flex: 1; }
.n-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; color: inherit; border-bottom: 1px solid #f0edfc; }
.n-row:last-child { border-bottom: 0; }
.n-row-img { position: relative; flex: none; width: 92px; height: 74px; border-radius: 10px; overflow: hidden; }
.n-rank { position: absolute; left: 5px; top: 5px; z-index: 1; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; background: var(--n-primary); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; }
.n-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.n-row-cat { font-size: .72rem; font-weight: 600; color: var(--n-primary); }
.n-row-title { font-size: .85rem; font-weight: 700; line-height: 1.3; color: var(--n-ink); }
.n-row:hover .n-row-title, .n-fcard:hover h3, .n-gcard:hover h3 { color: var(--n-primary); }

/* ---------- Featured ---------- */
.n-feat-track { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 14px; scroll-behavior: smooth; }
.n-fcard, .n-gcard { display: flex; flex-direction: column; padding: 10px; color: inherit; background: #fff; border: 1px solid var(--n-line); border-radius: 18px;
  box-shadow: 0 10px 28px -18px rgba(91,63,240,.35); transition: box-shadow .2s, border-color .2s; }
.n-fcard:hover, .n-gcard:hover { border-color: #cfc5fb; box-shadow: 0 16px 34px -18px rgba(91,63,240,.5); }
.n-fcard { flex: 0 0 100%; scroll-snap-align: start; }
@media (min-width: 640px) { .n-fcard { flex-basis: calc((100% - 20px) / 2); } }
@media (min-width: 1024px) { .n-fcard { flex-basis: calc((100% - 40px) / 3); } }
.n-media { position: relative; height: 156px; border-radius: 12px; overflow: hidden; }
.n-media .n-tag { position: absolute; left: 10px; top: 10px; z-index: 1; background: #fff; box-shadow: 0 4px 10px -4px rgba(0,0,0,.3); }
.n-fbody, .n-gbody { display: flex; flex-direction: column; flex: 1; gap: 8px; padding: 14px 8px 6px; }
.n-fcard h3, .n-gcard h3 { margin: 0; font-size: 1.0625rem; line-height: 1.375; font-weight: 700; color: var(--n-ink); }
.n-fcard p, .n-gcard p { margin: 0; font-size: 0.875rem; line-height: 1.6; color: var(--n-muted); }
.n-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; }

/* ---------- More ---------- */
.n-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.n-select { position: relative; }
.n-select select { appearance: none; -webkit-appearance: none; min-width: 150px; padding: 10px 38px 10px 14px; border: 1px solid var(--n-line); border-radius: 10px; background: #fff;
  font: inherit; font-size: .82rem; color: var(--n-ink); cursor: pointer; }
.n-select select:hover { border-color: var(--n-primary); }
.n-select svg { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--n-muted); }
.n-count { margin: -6px 0 14px; font-size: .8rem; color: var(--n-muted); }
.n-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 560px) { .n-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .n-grid { grid-template-columns: repeat(4, 1fr); } }
.n-gcard .n-media { height: 120px; }
.n-gcard h3 { font-size: .92rem; }
.n-inline-empty { grid-column: 1 / -1; text-align: center; padding: 36px 16px; color: var(--n-muted); font-size: .9rem; }
.n-inline-empty button { margin-top: 12px; }

.n-pager { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.n-pg { min-width: 40px; height: 40px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 10px; border: 1px solid var(--n-line); background: #fff;
  font: inherit; font-weight: 600; font-size: .875rem; color: var(--n-ink); cursor: pointer; transition: all .2s; }
.n-pg:hover:not(:disabled) { border-color: var(--n-primary); color: var(--n-primary); }
.n-pg[aria-current="page"] { background: var(--n-primary); border-color: var(--n-primary); color: #fff; }
.n-pg:disabled { opacity: .4; cursor: not-allowed; }
.n-pg-gap { color: var(--n-muted); padding: 0 4px; }
@media (max-width: 479px) { .n-pg-label { display: none; } }

/* ---------- States ---------- */
.n-state { max-width: 560px; margin: 24px auto 40px; padding: 40px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.n-state h2 { margin: 6px 0 0; font-size: 1.3rem; font-weight: 800; }
.n-state p { margin: 0 0 10px; color: var(--n-muted); font-size: .92rem; max-width: 420px; }
.n-state-ic { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--n-soft); color: var(--n-primary); font-size: 28px; }
.n-state-ic-err { background: #fff0f0; color: #dc2626; }

/* ---------- Skeletons ---------- */
.n-skel { background: linear-gradient(90deg, #ece8fb 25%, #f6f4ff 50%, #ece8fb 75%); background-size: 200% 100%; animation: nshim 1.4s infinite; border-radius: 10px; }
@keyframes nshim { to { background-position: -200% 0; } }
.n-skel-slide { position: absolute; inset: 0; border-radius: 0; background-color: #2a1f78; background-image: linear-gradient(90deg, #2a1f78 25%, #3a2c9a 50%, #2a1f78 75%); background-size: 200% 100%; }
@media (prefers-reduced-motion: reduce) { .n-skel { animation: none; } .n-slide { transition: none; } .n-feat-track { scroll-behavior: auto; } }