/* Intent Machine v2.0 — External CSS for WIELKA PRZEBUDOWA
   Shared across all 10 sites. Per-site accent via CSS custom properties.
   Target: <50KB per page total (CSS + HTML)
   Mobile-first design for emerging markets (75% mobile traffic)
*/

/* ═══════ RESET & BASE ═══════ */
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}
html{font-size:16px;scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,sans-serif;line-height:1.7;color:#1e293b;background:#fff;min-height:100vh;display:flex;flex-direction:column}
a{color:var(--im-accent,#3b82f6);text-decoration:none;transition:color .2s}
a:hover{color:var(--im-accent-hover,#2563eb);text-decoration:underline}
img{max-width:100%;height:auto;display:block}
main{flex:1}

/* ═══════ SKIP LINK ═══════ */
.skip-link{position:absolute;left:-9999px;top:0;z-index:9999;padding:8px 16px;background:var(--im-accent);color:#fff;font-weight:600}
.skip-link:focus{left:0}

/* ═══════ HEADER ═══════ */
.im-header{position:sticky;top:0;z-index:1000;background:var(--im-header-bg,#0f172a);border-bottom:1px solid rgba(255,255,255,0.06);height:56px}
.im-header-inner{max-width:1200px;margin:0 auto;padding:0 20px;display:flex;align-items:center;justify-content:space-between;height:100%}
.im-logo{text-decoration:none;display:flex;align-items:center;gap:8px}
.im-logo:hover{text-decoration:none}
.im-logo-text{font-size:17px;font-weight:700;color:var(--im-header-text,#e2e8f0);letter-spacing:-0.02em}
.im-logo-accent{color:var(--im-accent,#3b82f6)}
.im-nav-list{display:flex;list-style:none;gap:4px;align-items:center}
.im-nav-link{padding:6px 12px;color:var(--im-header-text-muted,#94a3b8);font-size:13px;font-weight:500;border-radius:6px;transition:all .2s;border:none;background:none;cursor:pointer;white-space:nowrap;text-decoration:none;font-family:inherit}
.im-nav-link:hover{color:var(--im-header-text,#e2e8f0);background:rgba(255,255,255,0.06);text-decoration:none}
.im-mobile-btn{display:none;background:none;border:none;color:var(--im-header-text,#e2e8f0);padding:8px;cursor:pointer}

/* ═══════ BREADCRUMB ═══════ */
.breadcrumb{max-width:800px;margin:16px auto 0;padding:0 20px;font-size:13px;color:#64748b}
.breadcrumb a{color:#64748b;text-decoration:none}
.breadcrumb a:hover{color:var(--im-accent)}

/* ═══════ ARTICLE LAYOUT ═══════ */
.article-container{max-width:800px;margin:0 auto;padding:0 20px 60px}
.article-header{margin:24px 0 32px}
.article-header h1{font-size:clamp(24px,4vw,36px);font-weight:800;line-height:1.2;color:#0f172a;margin-bottom:12px}
.article-meta{display:flex;flex-wrap:wrap;gap:12px;align-items:center;font-size:13px;color:#64748b;margin-bottom:16px}
.article-meta time{display:flex;align-items:center;gap:4px}

/* ═══════ DISCLOSURE ═══════ */
.disclosure{background:#fef3c7;border:1px solid #fde68a;padding:10px 16px;border-radius:8px;font-size:13px;color:#92400e;margin-bottom:24px}

/* ═══════ ARTICLE BODY ═══════ */
.article-body{font-size:16px;line-height:1.8}
.article-body h2{font-size:22px;font-weight:700;margin:32px 0 12px;color:#0f172a;padding-bottom:8px;border-bottom:2px solid #f1f5f9}
.article-body h3{font-size:18px;font-weight:600;margin:24px 0 8px;color:#1e293b}
.article-body h4{font-size:16px;font-weight:600;margin:20px 0 6px;color:#334155}
.article-body p{margin-bottom:16px}
.article-body ul,.article-body ol{margin-bottom:16px;padding-left:24px}
.article-body li{margin-bottom:6px}
.article-body li::marker{color:var(--im-accent)}
.article-body blockquote{border-left:4px solid var(--im-accent);padding:12px 20px;margin:20px 0;background:#f8fafc;border-radius:0 8px 8px 0;font-style:italic;color:#475569}
.article-body strong{color:#0f172a}
.article-body hr{border:none;border-top:2px solid #f1f5f9;margin:32px 0}

/* Tables */
.article-body table{width:100%;border-collapse:collapse;margin:20px 0;font-size:14px;overflow-x:auto;display:block}
.article-body th,.article-body td{padding:10px 12px;border:1px solid #e2e8f0;text-align:left}
.article-body th{background:#f8fafc;font-weight:600;color:#0f172a;white-space:nowrap}
.article-body tr:nth-child(even){background:#fafbfc}

/* Code */
.article-body pre{background:#1e293b;color:#e2e8f0;padding:16px;border-radius:8px;overflow-x:auto;margin:16px 0;font-size:14px}
.article-body code{background:#f1f5f9;padding:2px 6px;border-radius:4px;font-size:14px;font-family:'Fira Code',monospace}
.article-body pre code{background:none;padding:0}

/* Images */
.article-body img{border-radius:8px;margin:16px 0}
.article-body figure{margin:20px 0}
.article-body figcaption{font-size:13px;color:#64748b;text-align:center;margin-top:8px}

/* ═══════ AFFILIATE LINKS ═══════ */
.affiliate-link{color:var(--im-accent);font-weight:600;text-decoration:underline;text-underline-offset:2px}
.affiliate-link:hover{color:var(--im-accent-hover)}

/* ═══════ CTA BOX ═══════ */
.cta-box{background:linear-gradient(135deg,#f0f9ff,#e0f2fe);border:1px solid #bae6fd;border-radius:12px;padding:20px 24px;margin:24px 0;text-align:center}
.cta-box h3{font-size:18px;color:#0f172a;margin-bottom:8px}
.cta-box p{font-size:14px;color:#475569;margin-bottom:0}
.cta-box .cta-btn{display:inline-block;background:var(--im-accent);color:#fff;padding:10px 24px;border-radius:8px;font-weight:600;font-size:15px;margin-top:12px;transition:all .2s;text-decoration:none}
.cta-box .cta-btn:hover{background:var(--im-accent-hover);transform:translateY(-1px);text-decoration:none;color:#fff}

/* ═══════ PROS/CONS ═══════ */
.pros-cons{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:20px 0}
.pros,.cons{padding:16px;border-radius:8px}
.pros{background:#f0fdf4;border:1px solid #bbf7d0}
.cons{background:#fef2f2;border:1px solid #fecaca}
.pros h4,.cons h4{font-size:14px;font-weight:700;margin-bottom:8px}
.pros h4{color:#166534}
.cons h4{color:#991b1b}
.pros li,.cons li{font-size:14px;margin-bottom:4px}

/* ═══════ AUTHOR BOX ═══════ */
.author-box{background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:20px;margin:40px 0 24px;display:flex;gap:16px;align-items:start}
.author-avatar{width:56px;height:56px;border-radius:50%;background:var(--im-accent);display:flex;align-items:center;justify-content:center;color:#fff;font-size:22px;font-weight:700;flex-shrink:0}
.author-name{font-weight:700;font-size:16px;color:#0f172a}
.author-title{font-size:13px;color:var(--im-accent);margin-top:2px}
.author-bio{font-size:14px;color:#64748b;margin-top:6px;line-height:1.5}

/* ═══════ FAQ SECTION ═══════ */
.faq-section{margin:40px 0}
.faq-section h2{font-size:22px;font-weight:700;margin-bottom:16px;border-bottom:none}
.faq-item{border:1px solid #e2e8f0;border-radius:8px;margin-bottom:8px;overflow:hidden}
.faq-q{padding:14px 18px;font-weight:600;cursor:pointer;display:flex;justify-content:space-between;align-items:center;background:#f8fafc;font-size:15px;color:#0f172a;border:none;width:100%;text-align:left;font-family:inherit}
.faq-q:hover{background:#f1f5f9}
.faq-q svg{transition:transform .2s;flex-shrink:0;margin-left:12px}
.faq-a{padding:0 18px 14px;font-size:15px;color:#475569;line-height:1.7;display:none}
.faq-item.open .faq-a{display:block}
.faq-item.open .faq-q svg{transform:rotate(180deg)}

/* ═══════ RELATED ARTICLES ═══════ */
.related-articles{margin:32px 0}
.related-articles h2,.related-articles h3{font-size:18px;margin-bottom:12px;color:#1e293b;border-bottom:none}
.related-articles ul{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px;list-style:none;padding:0}
.related-articles li{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;overflow:hidden;transition:box-shadow .2s}
.related-articles li:hover{box-shadow:0 2px 8px rgba(0,0,0,.08)}
.related-articles li a{display:block;padding:12px 14px;color:#1e293b;text-decoration:none;font-size:14px;line-height:1.4}
.related-articles li a:hover{color:var(--im-accent)}

/* ═══════ FOOTER ═══════ */
footer{background:#0f172a;color:#94a3b8;padding:32px 20px;text-align:center;font-size:13px;margin-top:auto}
footer a{color:#60a5fa}
footer nav{margin-bottom:16px}
footer nav a{margin:0 12px;color:#94a3b8;text-decoration:none}
footer nav a:hover{color:#e2e8f0}

/* ═══════ COOKIE CONSENT ═══════ */
#im-cookie{position:fixed;bottom:0;left:0;right:0;z-index:10000;background:#111827;color:#94a3b8;padding:8px 20px;font-size:13px;display:flex;justify-content:space-between;align-items:center;box-shadow:0 -1px 4px rgba(0,0,0,.2)}
#im-cookie a{color:#60a5fa}
#im-cookie button{background:#334155;color:#e2e8f0;border:none;padding:4px 14px;border-radius:3px;cursor:pointer;font-size:12px;margin-left:12px}
#im-cookie button:hover{background:#475569}

/* ═══════ TABLE OF CONTENTS ═══════ */
.toc{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:16px 20px;margin:24px 0}
.toc h3{font-size:15px;font-weight:600;margin-bottom:8px;color:#0f172a}
.toc ol{padding-left:20px;margin:0}
.toc li{margin-bottom:4px;font-size:14px}
.toc a{color:#475569}
.toc a:hover{color:var(--im-accent)}

/* ═══════ READING PROGRESS BAR ═══════ */
#reading-progress{position:fixed;top:56px;left:0;width:0;height:3px;background:var(--im-accent);z-index:999;transition:width .1s}

/* ═══════ MOBILE ═══════ */
@media(max-width:768px){
  .im-nav-list{display:none}
  .im-mobile-btn{display:flex}
  .im-nav-list.active{display:flex;position:fixed;top:56px;left:0;right:0;background:var(--im-header-bg,#0f172a);flex-direction:column;padding:16px;gap:4px;border-bottom:1px solid rgba(255,255,255,0.1);z-index:999}
  .article-header h1{font-size:22px}
  .article-body{font-size:15px}
  .article-body h2{font-size:19px}
  .article-body h3{font-size:16px}
  .author-box{flex-direction:column;align-items:center;text-align:center}
  .pros-cons{grid-template-columns:1fr}
  .article-body table{font-size:13px}
  #im-cookie{padding:6px 12px;font-size:12px}
  .breadcrumb{font-size:12px}
}

/* ═══════ DARK MODE ═══════ */
@media(prefers-color-scheme:dark){
  body{background:#0f172a;color:#e2e8f0}
  .article-header h1{color:#f1f5f9}
  .article-body h2{color:#f1f5f9;border-bottom-color:#1e293b}
  .article-body h3{color:#e2e8f0}
  .article-body strong{color:#f1f5f9}
  .article-body th{background:#1e293b;color:#e2e8f0}
  .article-body td{border-color:#334155}
  .article-body tr:nth-child(even){background:#1e293b}
  .article-body blockquote{background:#1e293b;color:#94a3b8}
  .article-body code{background:#334155;color:#e2e8f0}
  .disclosure{background:#451a03;border-color:#78350f;color:#fbbf24}
  .author-box{background:#1e293b;border-color:#334155}
  .author-name{color:#f1f5f9}
  .faq-q{background:#1e293b;color:#f1f5f9}
  .faq-q:hover{background:#334155}
  .faq-item{border-color:#334155}
  .faq-a{color:#94a3b8}
  .related-articles li{background:#1e293b;border-color:#334155}
  .related-articles li a{color:#e2e8f0}
  .related-articles h2,.related-articles h3{color:#e2e8f0}
  .cta-box{background:linear-gradient(135deg,#1e293b,#0f172a);border-color:#334155}
  .cta-box h3{color:#f1f5f9}
  .cta-box p{color:#94a3b8}
  .pros{background:#052e16;border-color:#166534}
  .cons{background:#450a0a;border-color:#991b1b}
  .toc{background:#1e293b;border-color:#334155}
  .breadcrumb,.breadcrumb a{color:#64748b}
}

/* ═══════ PRINT ═══════ */
@media print{
  .im-header,#im-cookie,#reading-progress,.im-mobile-btn{display:none!important}
  body{font-size:12pt;color:#000;background:#fff}
  .article-container{max-width:100%;padding:0}
  a{color:#000;text-decoration:underline}
  .author-box,.cta-box{border:1px solid #ccc;page-break-inside:avoid}
}
