/* ============================================================
   MK Tech & Soft — v8 blog / editorial + ad-slot layer
   Loaded ONLY on blog, policy and advertise pages so the core
   pages keep their minimal critical CSS.
   ============================================================ */

/* ---------- Small utilities used by blog / policy / advertise pages ---------- */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.badge-accent { background: rgba(34, 211, 238, .13); border: 1px solid rgba(34, 211, 238, .32); color: var(--accent); }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.p-6 { padding: var(--s-6); }
.affiliate-slot {
  display: grid; gap: var(--s-3); padding: var(--s-5); margin: var(--s-6) 0;
  border: 1px dashed rgba(245, 165, 36, .42); border-radius: var(--r-lg);
  background: rgba(245, 165, 36, .05);
}
.affiliate-slot h3 { font-size: 1rem; color: #fcd34d; display: flex; align-items: center; gap: var(--s-2); }
.affiliate-slot p { font-size: .875rem; color: var(--text-2); }
.affiliate-slot .aff-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.affiliate-slot .aff-row a {
  font-size: .84rem; padding: 8px 14px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line-strong); color: var(--text-2);
}
.affiliate-slot .aff-row a:hover { border-color: var(--warm); color: #fcd34d; }
.affiliate-note { font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: var(--s-3); }

/* ---------- /Small utilities ---------- */

/* ---------- Editorial layout ---------- */
.editorial {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--s-8);
  align-items: start;
}
@media (max-width: 1024px) {
  .editorial { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
}

/* ---------- Article typography ---------- */
.prose { font-size: 1.045rem; line-height: 1.78; color: var(--text-2); }
.prose > * + * { margin-top: var(--s-4); }
.prose h2 {
  font-size: clamp(1.35rem, 2.3vw, 1.75rem);
  color: var(--text);
  margin-top: var(--s-7);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
  scroll-margin-top: 92px;
}
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 {
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
  color: var(--text);
  margin-top: var(--s-5);
  scroll-margin-top: 92px;
}
.prose h4 { font-size: 1.05rem; color: var(--text); margin-top: var(--s-4); }
.prose strong { color: var(--text); font-weight: 700; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: #67e8f9; }
.prose ul, .prose ol { padding-left: var(--s-5); list-style: revert; }
.prose li { margin-top: var(--s-2); }
.prose li::marker { color: var(--accent); }
.prose blockquote {
  margin: var(--s-5) 0;
  padding: var(--s-4) var(--s-5);
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--r) var(--r) 0;
  color: var(--text);
}
.prose code {
  font-family: var(--mono);
  font-size: .9em;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  color: #a5f3fc;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
  display: block;
  overflow-x: auto;
}
.prose th, .prose td {
  border: 1px solid var(--line);
  padding: 10px 13px;
  text-align: left;
  vertical-align: top;
}
.prose th { background: var(--bg-2); color: var(--text); font-weight: 700; }

/* ---------- Article header ---------- */
.article-head { margin-bottom: var(--s-6); }
.article-head h1 { font-size: clamp(1.8rem, 3.6vw, 2.65rem); margin-bottom: var(--s-4); }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  align-items: center;
  font-size: .85rem;
  color: var(--muted);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
}
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-meta svg { width: 15px; height: 15px; color: var(--accent); }

/* ---------- Table of contents ---------- */
.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--s-5);
  margin-bottom: var(--s-6);
  backdrop-filter: blur(10px);
}
.toc h2 { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: var(--s-3); }
.toc ol { padding-left: var(--s-5); list-style: decimal; font-size: .93rem; }
.toc li { margin-top: 5px; }
.toc a { color: var(--text-2); }
.toc a:hover { color: var(--accent); }

/* ---------- Callouts ---------- */
.callout {
  border-radius: var(--r);
  padding: var(--s-5);
  margin: var(--s-5) 0;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
}
.callout b { color: var(--text); }
.callout.info { border-color: rgba(34, 211, 238, .35); background: rgba(34, 211, 238, .07); }
.callout.warn { border-color: rgba(245, 165, 36, .38); background: rgba(245, 165, 36, .07); }
.callout.ok { border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .07); }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: var(--s-3); margin-top: var(--s-4); }
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: var(--s-4) var(--s-5);
  font-weight: 650;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
  flex: 0 0 auto;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-a { padding: 0 var(--s-5) var(--s-5); color: var(--text-2); }

/* ---------- Blog listing ---------- */
.blog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
  margin-bottom: var(--s-5);
}
.blog-search {
  flex: 1 1 260px;
  min-width: 0;
  padding: 12px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
  font-size: .95rem;
}
.blog-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.chip-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip-btn {
  padding: 8px 15px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--text-2);
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  transition: all .2s var(--ease);
}
.chip-btn:hover { border-color: var(--accent); color: var(--accent); }
.chip-btn.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--s-5); }
@media (max-width: 640px) { .post-grid { grid-template-columns: minmax(0, 1fr); } }

.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  backdrop-filter: blur(10px);
  transition: transform .28s var(--ease), border-color .28s var(--ease), box-shadow .28s var(--ease);
}
.post-card:hover { transform: translateY(-5px); border-color: rgba(34, 211, 238, .4); box-shadow: var(--shadow-3d); }
.post-thumb {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(34, 211, 238, .16), rgba(8, 13, 25, .6) 62%);
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.post-thumb svg { width: 54px; height: 54px; color: var(--accent); opacity: .8; }
.post-thumb .cat-label {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: rgba(5, 8, 15, .78);
  border: 1px solid rgba(34, 211, 238, .4);
  color: var(--accent);
}
.post-body { padding: var(--s-5); display: flex; flex-direction: column; flex: 1; }
.post-body h3 { font-size: 1.1rem; line-height: 1.35; }
.post-body h3 a { color: var(--text); }
.post-body h3 a:hover { color: var(--accent); }
.post-body p { font-size: .92rem; color: var(--muted); margin-top: var(--s-3); flex: 1; }
.post-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
  margin-top: var(--s-4);
  padding-top: var(--s-3);
  border-top: 1px solid var(--line);
  font-size: .78rem;
  color: var(--muted);
}

.pagination { display: flex; flex-wrap: wrap; gap: var(--s-2); justify-content: center; margin-top: var(--s-7); }
.pagination button {
  min-width: 42px;
  padding: 9px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--text-2);
  font: inherit;
  font-weight: 650;
  font-size: .9rem;
}
.pagination button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pagination button.active { background: var(--accent); border-color: var(--accent); color: #04121a; }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- Sidebar ---------- */
.side-stack { display: grid; gap: var(--s-5); position: sticky; top: 92px; }
@media (max-width: 1024px) { .side-stack { position: static; } }
.side-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: var(--s-5);
  backdrop-filter: blur(10px);
}
.side-card h3 { font-size: 1rem; margin-bottom: var(--s-3); }
.side-card p { font-size: .88rem; color: var(--muted); }
.side-list { display: grid; gap: var(--s-3); }
.side-list a { display: block; font-size: .9rem; color: var(--text-2); line-height: 1.45; }
.side-list a:hover { color: var(--accent); }
.side-list span { display: block; font-size: .75rem; color: var(--muted); margin-top: 2px; }

/* ---------- Related posts ---------- */
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s-4); margin-top: var(--s-5); }

/* ---------- Ad slots ---------- */
.ad-slot {
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r);
  background: rgba(8, 13, 25, .6);
  color: var(--muted);
  font-size: .74rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: var(--s-5) var(--s-4);
  overflow: hidden;
}
.ad-slot[data-ad]::before { content: "Advertisement"; position: absolute; top: 8px; }
.ad-slot ins { display: block; width: 100%; }
.ad-slot--leader { min-height: 92px; margin: var(--s-5) 0; }
.ad-slot--inline { min-height: 250px; margin: var(--s-6) 0; }
.ad-slot--side { min-height: 250px; margin-bottom: var(--s-5); }
.ad-slot--footer { min-height: 92px; margin-top: var(--s-7); }
.ad-ph { font-size: .78rem; color: var(--muted); opacity: .8; }

/* ---------- Newsletter ---------- */
.newsletter {
  border: 1px solid rgba(34, 211, 238, .3);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  background: linear-gradient(140deg, rgba(34, 211, 238, .1), rgba(5, 8, 15, .5));
}
.newsletter form { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-4); }
.newsletter input[type="email"] {
  flex: 1 1 240px;
  min-width: 0;
  padding: 12px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
}

/* ---------- Policy pages ---------- */
.policy-toc {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  padding: var(--s-5);
  margin-bottom: var(--s-6);
}
.policy-toc h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: var(--s-3); }
.policy-toc ol { padding-left: var(--s-5); list-style: decimal; font-size: .92rem; columns: 2; }
@media (max-width: 640px) { .policy-toc ol { columns: 1; } }
.policy-toc li { margin-top: 5px; }
.policy-toc a { color: var(--text-2); }
.policy-toc a:hover { color: var(--accent); }

/* ---------- Media-kit stats ---------- */
.kit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s-4); }
.kit-stat {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  padding: var(--s-5);
  text-align: center;
}
.kit-stat b { display: block; font-size: 1.9rem; color: var(--accent); line-height: 1.1; }
.kit-stat span { font-size: .84rem; color: var(--muted); }

/* ---------- Rate table ---------- */
.rate-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.rate-table th, .rate-table td { border: 1px solid var(--line); padding: 12px 14px; text-align: left; }
.rate-table th { background: var(--bg-2); }
.rate-table td b { color: var(--accent); }

/* ---------- Affiliate disclosure ---------- */
.affiliate-note {
  font-size: .82rem;
  color: var(--muted);
  border-left: 3px solid var(--warm);
  background: rgba(245, 165, 36, .07);
  padding: var(--s-3) var(--s-4);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin: var(--s-4) 0;
}

/* ---------- Affiliate / product box ---------- */
.pick-box {
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--bg-2);
  padding: var(--s-5);
  margin: var(--s-5) 0;
}
.pick-box h3 { font-size: 1.02rem; margin-bottom: var(--s-3); }
.pick-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
  justify-content: space-between;
  padding: var(--s-3) 0;
  border-top: 1px solid var(--line);
}
.pick-row:first-of-type { border-top: 0; }
.pick-row p { font-size: .9rem; color: var(--text-2); flex: 1 1 220px; }

/* ---------- CTA band inside article ---------- */
.article-cta {
  display: grid;
  gap: var(--s-4);
  border: 1px solid rgba(34, 211, 238, .32);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  background: linear-gradient(135deg, rgba(34, 211, 238, .12), rgba(5, 8, 15, .55));
  margin: var(--s-7) 0;
}
.article-cta h3 { font-size: 1.25rem; }

/* ---------- Breadcrumb extension ---------- */
.breadcrumb span:last-child { color: var(--text-2); }

/* ---------- Blog hero ---------- */
.blog-hero { padding-block: var(--s-8) var(--s-6); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.blog-hero::before {
  content: "";
  position: absolute;
  inset: -40% 55% 0 -10%;
  background: radial-gradient(closest-side, rgba(34, 211, 238, .16), transparent);
  pointer-events: none;
}
.blog-hero .container { position: relative; z-index: 1; }
.blog-hero h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin-bottom: var(--s-3); }
.blog-hero p { color: var(--text-2); max-width: 720px; }

/* ---------- Reading progress ---------- */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  z-index: 120;
  transition: width .12s linear;
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .article-meta { gap: var(--s-3); font-size: .8rem; }
  .post-grid { gap: var(--s-4); }
  .newsletter { padding: var(--s-5); }
  .prose { font-size: 1rem; }
  .ad-slot--side { min-height: 180px; }
}

/* ---------- Newsletter band (footer) ---------- */
.newsletter-band {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--s-4); padding: var(--s-5) var(--s-6); margin-bottom: var(--s-6);
  border: 1px solid rgba(34, 211, 238, .28); border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(34, 211, 238, .1), rgba(5, 8, 15, .5));
}
.newsletter-band .nb-copy { display: grid; gap: 3px; min-width: 240px; }
.newsletter-band .nb-copy b { font-size: 1.02rem; }
.newsletter-band .nb-copy span { font-size: .86rem; color: var(--text-2); }
.newsletter-band .nb-form { display: flex; flex-wrap: wrap; gap: var(--s-2); flex: 1 1 320px; }
.newsletter-band .nb-form input[type="email"] {
  flex: 1 1 200px; padding: 11px 14px; border-radius: var(--r-sm);
  background: rgba(8, 13, 25, .85); border: 1px solid var(--line-strong); color: var(--text); font: inherit; font-size: .93rem;
}
.newsletter-band .nb-form input[type="email"]:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(34, 211, 238, .16);
}
.newsletter-band .form-status { flex: 1 1 100%; }
@media (max-width: 720px) {
  .newsletter-band { padding: var(--s-5); }
  .newsletter-band .nb-form .btn { width: 100%; }
}
