/* ============================================================
   WindowsNews.AI — Article + Category page styles
   ============================================================ */

/* breadcrumb */
.crumbs { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--text-faint); display: flex; align-items: center; gap: 9px; padding: 22px 0 0; flex-wrap: wrap; }
.crumbs a:hover { color: var(--brand); }
.crumbs .sl { opacity: .5; }

/* ARTICLE layout */
.art-wrap { display: grid; grid-template-columns: minmax(0,1fr) 332px; gap: 52px; align-items: start; padding: 8px 0 56px; }
.art-main { max-width: 760px; }

.art-head { padding: 16px 0 8px; }
.art-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 16px 0 16px;
  text-wrap: balance;
}
.art-dek { font-family: var(--font-read); font-size: 21px; line-height: 1.5; color: var(--text-2); font-weight: 400; max-width: 62ch; }
.art-dek em, .art-dek i { font-style: italic; }

.art-meta {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin: 22px 0; padding: 16px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.art-author { display: flex; align-items: center; gap: 11px; }
.art-author .av { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg,var(--brand-bright),var(--cat-ai)); display:grid;place-items:center;color:#fff;font-family:var(--font-display);font-weight:700;font-size:15px; flex:none; }
.art-author .nm { font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: -0.01em; }
.art-author .ro { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); margin-top: 2px; letter-spacing: 0.03em; }
.art-meta-r { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.art-meta-stat { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.art-meta-stat svg { width: 13px; height: 13px; opacity: .7; }
.share-btn { width: 36px; height: 36px; border-radius: var(--r-sm); border: 1px solid var(--line); display: grid; place-items: center; color: var(--text-2); transition: all .16s; }
.share-btn:hover { color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); }
.share-btn svg { width: 15px; height: 15px; }

.art-hero { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16/8.5; margin: 4px 0 8px; box-shadow: var(--sh-md); position: relative; background: var(--skeleton); }
.art-hero .mesh { position: absolute; inset: 0; }
.art-caption { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); padding: 11px 2px 0; letter-spacing: 0.02em; line-height: 1.5; }
.art-caption b { color: var(--text-3); }

/* AI summary box — signature */
.ai-summary {
  border-radius: var(--r-lg);
  margin: 26px 0;
  overflow: hidden;
  border: 1px solid var(--cat-ai-soft);
  background:
    radial-gradient(120% 120% at 100% 0%, var(--cat-ai-soft), transparent 55%),
    var(--surface);
}
.ai-summary-head { display: flex; align-items: center; gap: 11px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.ai-summary-head .spark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg,var(--cat-ai),var(--brand)); flex: none; }
.ai-summary-head .spark svg { width: 17px; height: 17px; }
.ai-summary-head .t { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.ai-summary-head .t small { display: block; font-family: var(--font-mono); font-weight: 400; font-size: 10px; color: var(--text-faint); letter-spacing: 0.04em; margin-top: 2px; }
.ai-summary-head .listen { margin-left: auto; }
.ai-summary-body { padding: 18px 20px; }
.ai-summary-body .lead { font-size: 15px; line-height: 1.6; color: var(--text-2); margin-bottom: 15px; }
.ai-summary-body ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ai-summary-body li { display: grid; grid-template-columns: 16px 1fr; gap: 11px; font-size: 14px; line-height: 1.45; color: var(--text-2); }
.ai-summary-body li svg { width: 15px; height: 15px; color: var(--cat-ai); margin-top: 2px; }
.ai-summary-body li b { color: var(--text); font-weight: 650; }

/* PROSE — Newsreader serif */
.prose { font-family: var(--font-read); font-size: 19.5px; line-height: 1.72; color: var(--text); }
.prose > p { margin: 0 0 1.35em; }
.prose > p:first-of-type::first-letter {
  font-weight: 700; font-size: 3.5em; line-height: 0.82; float: left;
  padding: 4px 12px 0 0; color: var(--brand); font-family: var(--font-display); letter-spacing: -0.02em;
}
.prose a { color: var(--brand); text-decoration: underline; text-decoration-color: var(--brand-line); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.prose a:hover { text-decoration-color: var(--brand); }
.prose h2 { font-family: var(--font-display); font-weight: 800; font-size: 28px; letter-spacing: -0.025em; line-height: 1.15; margin: 1.8em 0 0.6em; color: var(--text); }
.prose h3 { font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -0.02em; margin: 1.5em 0 0.5em; }
.prose strong { font-weight: 700; }
.prose em { font-style: italic; }
.prose ul, .prose ol { margin: 0 0 1.35em; padding-left: 1.3em; }
.prose li { margin-bottom: 0.55em; }
.prose blockquote {
  margin: 1.6em 0; padding: 6px 0 6px 26px;
  border-left: 3px solid var(--brand);
  font-size: 25px; line-height: 1.4; letter-spacing: -0.015em;
  color: var(--text); font-weight: 500;
}
.prose blockquote cite { display: block; font-family: var(--font-mono); font-size: 12px; font-style: normal; color: var(--text-faint); margin-top: 12px; letter-spacing: 0.03em; }

/* code block */
.prose pre {
  font-family: var(--font-mono); font-size: 13.5px; line-height: 1.65;
  background: var(--ink-950); color: #e6edf3;
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px 20px; margin: 1.6em 0; overflow-x: auto;
  position: relative;
}
[data-theme="dark"] .prose pre { background: #060a13; }
.prose pre . co { color: #7d8aa3; }
.prose pre .kw { color: #79c0ff; }
.prose pre .st { color: #7ee787; }
.prose pre .fn { color: #d2a8ff; }
.prose code { font-family: var(--font-mono); font-size: 0.82em; background: var(--surface-3); padding: 2px 6px; border-radius: 5px; color: var(--brand-ink); }
[data-theme="dark"] .prose code { color: var(--brand); }
.prose pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.code-lang { position: absolute; top: 10px; right: 14px; font-family: var(--font-mono); font-size: 10px; color: #7d8aa3; letter-spacing: 0.1em; text-transform: uppercase; }

/* inline figure */
.prose figure { margin: 1.8em 0; }
.prose figure .fig-img { border-radius: var(--r-md); overflow: hidden; aspect-ratio: 16/9; position: relative; background: var(--skeleton); }
.prose figure .fig-img .mesh { position: absolute; inset: 0; }
.prose figcaption { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); margin-top: 9px; letter-spacing: 0.02em; }

/* table */
.prose table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-family: var(--font-ui); font-size: 14px; }
.prose th { text-align: left; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); padding: 11px 14px; border-bottom: 2px solid var(--line-2); }
.prose td { padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--text-2); }
.prose tr:hover td { background: var(--surface-2); }

/* callout */
.callout { font-family: var(--font-ui); display: grid; grid-template-columns: 22px 1fr; gap: 13px; background: var(--cat-dev-soft); border: 1px solid color-mix(in oklab, var(--cat-dev) 25%, transparent); border-radius: var(--r-md); padding: 16px 18px; margin: 1.6em 0; font-size: 15px; line-height: 1.55; color: var(--text); }
.callout svg { width: 19px; height: 19px; color: var(--cat-dev); margin-top: 2px; }
.callout b { font-weight: 700; }

/* sources */
.sources { margin: 38px 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.sources-h { padding: 14px 18px; border-bottom: 1px solid var(--line); font-family: var(--font-display); font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 9px; background: var(--surface-2); }
.sources-h svg { width: 15px; height: 15px; color: var(--brand); }
.source-item { display: flex; align-items: center; gap: 13px; padding: 13px 18px; border-bottom: 1px solid var(--line); transition: background .15s; }
.source-item:last-child { border: none; }
.source-item:hover { background: var(--surface-2); }
.source-fav { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; flex: none; font-family: var(--font-display); font-weight: 700; font-size: 13px; color: #fff; }
.source-item .sm { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.source-item .st { font-weight: 600; font-size: 13.5px; letter-spacing: -0.01em; line-height: 1.3; }
.source-item:hover .st { color: var(--brand); }
.source-item .su { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.source-item .ext { width: 14px; height: 14px; color: var(--text-faint); flex: none; }

/* reference cards — rich unfurl rows (favicon + badge + og:image thumb) */
.refcards { margin: 38px 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; font-family: var(--font-ui); }
.refcards-h { padding: 14px 18px; border-bottom: 1px solid var(--line); font-family: var(--font-display); font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 9px; background: var(--surface-2); }
.refcards-h svg { width: 15px; height: 15px; color: var(--brand); }
.refcards-n { margin-left: auto; font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: var(--text-3); background: var(--surface-3); border-radius: var(--r-pill); padding: 2px 9px; }
.refcard { display: flex; align-items: flex-start; gap: 13px; padding: 14px 18px; border-bottom: 1px solid var(--line); transition: background .15s; }
.refcard:hover { background: var(--surface-2); }
.refcards > .refcards-list:last-child .refcard:last-child { border-bottom: none; }
.refcards-more .refcards-list .refcard:last-child { border-bottom: none; }
.refcard-fav { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; flex: none; font-family: var(--font-display); font-weight: 700; font-size: 13px; color: #fff; position: relative; overflow: hidden; margin-top: 2px; }
.refcard-fav img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--surface); }
.refcard-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.refcard-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.refcard-site { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
.refcard-badge { font-family: var(--font-mono); font-size: 9.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.5; padding: 2px 7px; border-radius: var(--r-pill); color: var(--text-3); background: var(--surface-3); }
.refcard-badge--primary { color: var(--brand); background: var(--brand-soft); }
.refcard-badge--official { color: var(--cat-enterprise); background: var(--cat-enterprise-soft); }
.refcard-badge--security_advisory { color: var(--cat-security); background: var(--cat-security-soft); }
.refcard-badge--community { color: var(--cat-cloud); background: var(--cat-cloud-soft); }
.refcard-date { font-family: var(--font-mono); font-size: 10px; color: var(--text-faint); }
.refcard-t { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.refcard:hover .refcard-t { color: var(--brand); }
.refcard-d { font-size: 12.5px; line-height: 1.5; color: var(--text-3); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.refcard-u { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.refcard-thumb { width: 72px; height: 54px; border-radius: 8px; overflow: hidden; flex: none; background: var(--skeleton); margin-top: 2px; }
.refcard-thumb img { width: 100%; height: 100%; object-fit: cover; }
.refcard .ext { width: 14px; height: 14px; color: var(--text-faint); flex: none; margin-top: 4px; }
.refcards-more summary { list-style: none; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; cursor: pointer; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); background: var(--surface-2); transition: color .15s; }
.refcards-more summary:hover { color: var(--brand); }
.refcards-more summary::-webkit-details-marker { display: none; }
.refcards-more summary svg { width: 15px; height: 15px; transition: transform .2s; }
.refcards-more[open] summary svg { transform: rotate(180deg); }
.refcards-more[open] summary { border-bottom: 1px solid var(--line); }
@media (max-width: 560px) { .refcard-thumb { display: none; } }

/* forum discussion CTA */
.discuss-cta { display: flex; align-items: center; gap: 14px; margin: 26px 0; padding: 16px 18px; border: 1px solid var(--brand-line); border-radius: var(--r-lg); background: var(--brand-soft); transition: border-color .15s, background .15s; }
.discuss-cta:hover { border-color: var(--brand); }
.discuss-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(135deg, var(--brand-bright), var(--brand)); }
.discuss-ico svg { width: 18px; height: 18px; }
.discuss-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.discuss-t { font-family: var(--font-display); font-weight: 700; font-size: 14.5px; letter-spacing: -0.01em; }
.discuss-cta:hover .discuss-t { color: var(--brand); }
.discuss-d { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); }
.discuss-cta .ext { width: 15px; height: 15px; color: var(--text-faint); flex: none; }

/* tags */
.tagrow { display: flex; flex-wrap: wrap; gap: 9px; margin: 30px 0; }
.tag { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-2); border: 1px solid var(--line-2); border-radius: var(--r-pill); padding: 6px 13px; transition: all .15s; }
.tag::before { content: "#"; color: var(--text-faint); margin-right: 1px; }
.tag:hover { color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); }

/* author bio */
.authorbio { display: grid; grid-template-columns: 64px 1fr; gap: 18px; padding: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); margin: 30px 0; }
.authorbio .av { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg,var(--brand-bright),var(--cat-ai)); display:grid;place-items:center;color:#fff;font-family:var(--font-display);font-weight:700;font-size:22px; }
.authorbio .nm { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -0.015em; }
.authorbio .ro { font-family: var(--font-mono); font-size: 10.5px; color: var(--brand); margin-top: 3px; letter-spacing: 0.04em; text-transform: uppercase; }
.authorbio .bi { font-size: 13.5px; color: var(--text-3); line-height: 1.55; margin-top: 9px; }
.authorbio .fl { display: flex; gap: 8px; margin-top: 13px; }

/* progress bar */
.read-progress { position: fixed; top: 0; left: 0; height: 3px; background: linear-gradient(90deg, var(--brand), var(--cat-ai)); z-index: 100; width: 0; transition: width .1s linear; }

/* related */
.related { border-top: 1px solid var(--line); padding: 40px 0; }

/* ===== CATEGORY page ===== */
.cat-hero { padding: 26px 0 30px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.cat-hero-bg { position: absolute; inset: 0; z-index: -1; opacity: .5; }
.cat-hero .ico { width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center; color: #fff; margin-bottom: 16px; }
.cat-hero .ico svg { width: 26px; height: 26px; }
.cat-hero h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(32px, 4.5vw, 52px); letter-spacing: -0.035em; line-height: 1; }
.cat-hero .desc { font-size: 16px; color: var(--text-2); line-height: 1.6; max-width: 64ch; margin-top: 14px; }
.cat-hero .stats { display: flex; gap: 24px; margin-top: 20px; flex-wrap: wrap; }
.cat-stat { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 7px; }
.cat-stat b { font-family: var(--font-display); font-size: 16px; color: var(--text); font-weight: 700; }
.cat-actions { display: flex; gap: 9px; margin-top: 20px; }

.filterbar { display: flex; align-items: center; gap: 10px; padding: 18px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; position: sticky; top: calc(34px + var(--nav-h)); background: var(--bg-page); z-index: 20; }
.filter-chip { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em; padding: 7px 14px; border-radius: var(--r-pill); border: 1px solid var(--line-2); color: var(--text-3); transition: all .15s; }
.filter-chip:hover { color: var(--text); border-color: var(--line-strong); }
.filter-chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.filter-spacer { margin-left: auto; }
.filter-sort { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }
.filter-sort select { font-family: var(--font-ui); font-size: 13px; font-weight: 600; color: var(--text); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 6px 10px; outline: none; cursor: pointer; }

.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); padding: 30px 0; }
@media (max-width: 980px) { .cat-grid { grid-template-columns: repeat(2,1fr); } .art-wrap { grid-template-columns: 1fr; } .art-main { max-width: none; } }
@media (max-width: 600px) { .cat-grid { grid-template-columns: 1fr; } }

/* pagination */
.pager { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 20px 0 50px; }
.pager a { min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); display: grid; place-items: center; font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--text-2); transition: all .15s; }
.pager a:hover { border-color: var(--brand-line); color: var(--brand); }
.pager a.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.pager a.dis { opacity: .4; pointer-events: none; }

/* view switch — no entrance transform so static capture / print / PDF export stay pixel-clean */
.view-in { }

@media (max-width: 600px) {
  .prose { font-size: 18px; }
  .art-meta-r { margin-left: 0; width: 100%; }
}
