/* /templates/single/profilio-single.css */
/* Cel: jak React/Tailwind (slate/emerald), lżejsze fonty (500/600), subtelniejsze UI */

.ps, .ps * { box-sizing: border-box; }
.ps {
  font-family: Poppins, sans-serif;
  background: #f8fafc; /* slate-50 */
  color: #0f172a;      /* slate-900 */
}
.ps a { color: inherit; }
.ps-shell { max-width: 1152px; margin: 0 auto; padding: 0 16px; }

/* Progress */
.ps-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 4px;
  background: rgba(148,163,184,.45); /* slate-400/45 */
  z-index: 9999;
}
.ps-progress__bar {
  height: 100%;
  width: 0%;
  background: #10b981; /* emerald-500 */
  transition: width .08s linear;
}
span.ps-ico{
	display: flex !important;
}
span.ps-tocN {
    margin-right: 5px !important;
}
/* HERO (React: PROFILIO_GRADIENT + overlay 0.35) */
.ps-hero { position: relative; padding: 58px 0 26px; }
.ps-hero__bg{
  position:absolute; inset:0;
  background: linear-gradient(135deg, #1ea7e6, #19b9c8, #33c58f, #8fd15a);
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
}
.ps-hero__bg::after{
  content:"";
  position:absolute; inset:0;
  background: rgba(15,23,42,.35); /* slate-900/35 */
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
}
.ps-hero .ps-shell{ position: relative; z-index: 2; }

.ps-hero__top{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; padding-top: 12px;
}

.ps-ico svg{ width: 18px; height: 18px; }

.ps-back{
  display:inline-flex; align-items:center; gap:10px;
  padding:10px 14px;
  border-radius:999px;
  background: rgba(255,255,255,.80);
  border: 1px solid rgba(255,255,255,.30);
  text-decoration:none;
  font-weight: 600;
  font-size: 12px;
  color:#0f172a;
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 6px rgba(2,6,23,.12);
}

.ps-actions{ display:flex; gap:10px; align-items:center; position:relative; }
.ps-ibtn{
  width: 36px; height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.50);
  background: rgba(255,255,255,.70);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 6px rgba(2,6,23,.12);
}
.ps-ibtn:hover{ background: rgba(255,255,255,.85); }

.ps-share{ position: relative; }
.ps-sharemenu{
  position:absolute; right:0; top:44px;
  min-width: 200px;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(2,6,23,.14);
  padding: 8px;
  display:none;
}
.ps-sharemenu.is-open{ display:block; }
.ps-shareitem{
  display:flex; width:100%;
  text-align:left;
  padding:10px 12px;
  border-radius: 14px;
  border:0; background:transparent; cursor:pointer;
  color:#334155;
  text-decoration:none;
  font-weight: 600;
  font-size: 13px;
}
.ps-shareitem:hover{ background:#f1f5f9; }

/* Pills w hero (React: kategoria white/85, reszta white/15) */
.ps-metaRow{ display:flex; flex-wrap:wrap; gap:8px; margin-top: 16px; }
.ps-pill{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 12px;
  border-radius:999px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.92);
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.20);
  backdrop-filter: blur(6px);
}
.ps-pill--muted{ color: rgba(255,255,255,.90); }
.ps-pill--cat{
  color:#0f172a;
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.30);
  box-shadow: 0 1px 8px rgba(2,6,23,.14);
}
.ps-dot{ width:8px; height:8px; border-radius:999px; background:#10b981; display:inline-block; }

/* Title & lead (React: font-semibold, nie bold/black) */
.ps-title{
  margin: 14px 0 0;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 600;
  color:#fff;
  max-width: 56ch;
}
@media (min-width: 768px){
  .ps-title{ font-size: 38px; }
}
.ps-lead{
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.7;
  font-weight: 500;
  color: rgba(255,255,255,.85);
  max-width: 78ch;
}
@media (min-width: 768px){
  .ps-lead{ font-size: 15px; }
}

/* Tags (React: white/85 + font-bold-ish, ale nie 900) */
.ps-tags{ display:flex; flex-wrap:wrap; gap:8px; margin-top: 12px; }
.ps-chip{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.30);
  font-size: 12px;
  font-weight: 650;
  color:#334155;
  box-shadow: 0 1px 8px rgba(2,6,23,.12);
}

/* Cover (contain + border + shadow-sm) */
.ps-cover{ margin: 18px 0 0; }
.ps-cover{
  border-radius: 28px;
  overflow: hidden;
  border:1px solid #e2e8f0;
  background:#fff;
  box-shadow: 0 2px 12px rgba(2,6,23,.08);
}
.ps-cover__img{
  width:100%;
  aspect-ratio: 16/9;
  background-color: #f1f5f9;
  background-repeat:no-repeat;
  background-position:center;
  background-size: contain;
  position: relative;
}
.ps-cover__img::after{
  content:"";
  position:absolute; inset:auto 0 0 0;
  height: 112px;
  background: linear-gradient(to top, rgba(15,23,42,.55), transparent);
}
.ps-cover__cap{
  display:flex;
  justify-content: space-between;
  gap: 10px;
  align-items:center;
  padding: 12px 14px;
  color:#64748b;
  font-size: 13px;
  background:#fff;
}
.ps-capbadge{
  padding:6px 10px;
  border-radius:999px;
  background: #f8fafc;
  border:1px solid #e2e8f0;
  font-weight: 600;
  color:#475569;
}
.ps-capsrc{ font-weight: 500; color:#64748b; }

/* Controls under cover */
.ps-hero__controls{ display:flex; gap:10px; margin-top: 14px; flex-wrap: wrap; }

/* Buttons (React: rounded-full, font-semibold) */
.ps-btn{
  display:inline-flex; align-items:center; justify-content:center; gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border:1px solid #e2e8f0;
  background:#fff;
  font-size: 13px;
  font-weight: 600;
  cursor:pointer;
  text-decoration:none;
  color:#0f172a;
  box-shadow: 0 1px 8px rgba(2,6,23,.06);
}
.ps-btn--soft{ background: rgba(255,255,255,.80); }
.ps-btn--ghost{ background:#fff; }
.ps-btn--dark{ background:#0f172a; color:#fff; border-color:#0f172a; }
.ps-btn--dark:hover{ background:#111827; }
.ps-btn--emerald{ background:#059669; color:#fff; border-color:#059669; }
.ps-btn--emerald:hover{ filter: brightness(.95); }
.ps-btn--full{ width:100%; }

.ps-main{ padding: 22px 0 64px; }

/* TOP CARDS */
.ps-topCards{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
   
}
@media (min-width: 900px){
  .ps-topCards{ grid-template-columns: 1.65fr .95fr; }
}

/* Cards (React: rounded-3xl + shadow-sm) */
.ps-card{
  background:#fff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  box-shadow: 0 2px 12px rgba(2,6,23,.08);
  padding: 16px;
}
.ps-card--big{ border-radius: 28px; padding: 18px; }
@media (min-width: 768px){ .ps-card--big{ padding: 20px; } }

.ps-card__head{
  display:flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 12px;
}
.ps-card__head--tight{ align-items:center; }
.ps-card__title{ font-size: 14px; font-weight: 600; color:#0f172a; }
.ps-card__hint{ font-size: 13px; color:#64748b; font-weight: 500; margin-top: 2px; }
.ps-miniLink{ font-size: 13px; font-weight: 600; color:#047857; text-decoration:none; }

/* GRID layout */
.ps-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 14px;
}
@media (min-width: 1024px){
  .ps-grid{ grid-template-columns: 360px 1fr; gap: 18px; align-items: start; }
}
.ps-card--sticky{ position: sticky; top: 80px; } /* React: top-20 */

/* TOC */
.ps-toc{ display:flex; flex-direction:column; gap: 6px; }
.ps-tocItem{
  text-align:left;
  border: 1px solid #e2e8f0;
  background:#fff;
  border-radius: 16px;
  padding: 10px 12px;
  display:flex; align-items:center;
  cursor:pointer;
  transition: background .15s ease, box-shadow .15s ease, border-color .15s ease;
  font-weight: 600;
  color:#334155;
}
.ps-tocItem:hover{ background:#f8fafc; }
.ps-tocItem.is-active{
  border-color: rgba(16,185,129,.45);
  box-shadow: 0 0 0 4px rgba(16,185,129,.12);
  background: rgba(16,185,129,.10);
  color:#065f46;
}
.ps-tocT{ font-weight: 600; font-size: 13px; line-height:1.25; }

/* Quick takeaways (React: kwadrat + ring) */
.ps-quick{
  margin:0; padding:0;
  list-style:none;
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.ps-quick li{
  display:flex;
  gap: 12px;
  align-items:flex-start;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.65;
  color:#334155;
}
.ps-qico{
  flex:none;
  width: 24px; height: 24px;
  border-radius: 12px;
  background: rgba(16,185,129,.10);
  color:#047857;
  border: 1px solid rgba(16,185,129,.25);
  display:flex;
  align-items:center;
  justify-content:center;
  margin-top: 2px;
}
.ps-qico svg{ width: 16px; height: 16px; }

/* Author */
.ps-author{ display:flex; gap: 12px; align-items:center; margin: 6px 0 14px; }
.ps-avatar{
  width: 36px; height: 36px;
  border-radius: 999px;
  background:#0f172a;
  color:#fff;
  border:1px solid #0f172a;
  display:flex; align-items:center; justify-content:center;
  font-weight: 700;
  font-size: 12px;
}
.ps-author__name{ font-weight: 600; font-size: 13px; color:#0f172a; }
.ps-author__role{ font-size: 13px; color:#64748b; font-weight: 500; }

/* Callout in author card (React: emerald-50/70, border emerald-200) */
.ps-callout{
  border:1px solid #e2e8f0;
  border-radius: 20px;
  padding: 14px;
  background:#f8fafc;
}
.ps-callout--green{
  background: rgba(16,185,129,.10);
  border-color: rgba(16,185,129,.25);
}
.ps-callout__ttl{ font-weight: 600; font-size: 14px; color:#064e3b; margin-bottom: 6px; }
.ps-callout__txt{ font-size: 13px; font-weight: 500; color:#065f46; line-height: 1.6; margin-bottom: 10px; }

/* Premium blocks inside Quick actions */
.ps-premium{ display:flex; flex-direction:column; gap: 12px; margin-top: 12px; }
.ps-premium__item{
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 12px;
  background: #f8fafc;
}
.ps-premium__top{ display:flex; justify-content: space-between; gap: 10px; align-items:flex-start; }
.ps-premium__t{ font-weight: 600; font-size: 14px; color:#0f172a; }
.ps-premium__d{
  margin-top: 6px;
  font-size: 13px;
  color:#64748b;
  font-weight: 500;
  line-height: 1.6;
}
.ps-premium__note{ margin-top: 10px; font-size: 13px; color:#64748b; font-weight: 500; }
.ps-badge{
  display:inline-flex; gap: 8px; align-items:center;
  font-size: 13px;
  font-weight: 600;
  color:#475569;
  background:#fff;
  border:1px solid #e2e8f0;
  padding: 6px 10px;
  border-radius: 999px;
}

/* Hint */
.ps-hint__ttl{
  font-size: 13px;
  font-weight: 600;
  color:#64748b;
  text-transform: uppercase;
  letter-spacing:.05em;
}
.ps-hint__txt{
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  color:#334155;
  line-height: 1.7;
}

/* Inputs */
.ps-inp{
  width: 100%;
  border:1px solid #e2e8f0;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13px;
  outline:none;
  background:#fff;
  font-weight: 500;
}
.ps-inp:focus{
  box-shadow: 0 0 0 4px rgba(16,185,129,.18);
  border-color: rgba(16,185,129,.55);
}
.ps-inp--news{ border-radius: 14px; }

.ps-news{ margin-top: 12px; }
.ps-news__row{ margin-top: 10px; }
.ps-news__note{
  margin-top: 10px;
  font-size: 13px;
  color:#64748b;
  font-weight: 500;
  line-height: 1.55;
}

/* Article box */
.ps-article{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius: 28px;
  padding: 18px;
  box-shadow: 0 2px 12px rgba(2,6,23,.08);
}
@media (min-width: 768px){ .ps-article{ padding: 28px; } }

.ps-article p{
  color:#334155;
  line-height: 1.75;
  font-size: 15px;
  font-weight: 500;
}
.ps-article a{ color:#047857; font-weight: 600; }
.ps-article ul, .ps-article ol{ color:#334155; line-height: 1.7; }
.ps-article strong{ color:#0f172a; font-weight: 600; }

.ps-article table{
  width:100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 16px 0;
  overflow:hidden;
  border-radius: 16px;
  border:1px solid #e2e8f0;
  background:#fff;
}
.ps-article th, .ps-article td{
  padding: 12px 12px;
  border-bottom:1px solid #e2e8f0;
  font-size: 13px;
  font-weight: 500;
  color:#334155;
}
.ps-article th{
  background:#f8fafc;
  text-align:left;
  font-weight: 600;
  color:#475569;
}
.ps-article tr:last-child td{ border-bottom:0; }

/* Section headers inserted around H2 (React: sekcja label + h2 font-semibold) */
.ps-sec{ scroll-margin-top: 96px; margin-top: 26px; }
.ps-secLabel{
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  color:#64748b;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.ps-secHead{ display:flex; align-items:flex-start; justify-content:space-between; gap: 12px; }
.ps-h2{
  font-size: 26px;
  line-height: 1.2;
  font-weight: 600;
  margin: 0;
  color:#0f172a;
}
@media (min-width: 768px){
  .ps-h2{ font-size: 30px; }
}
.ps-h3{
  font-size: 18px;
  line-height: 1.3;
  font-weight: 600;
  margin: 18px 0 8px;
  color:#0f172a;
}
.ps-secLink{
  flex: none;
  border:1px solid #e2e8f0;
  background:#fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  display:inline-flex; gap: 8px; align-items:center;
  cursor:pointer;
  box-shadow: 0 1px 8px rgba(2,6,23,.06);
}
.ps-secLink:hover{ background:#f8fafc; }

/* Related */
.ps-related{ margin-top: 16px; }
.ps-related__head{
  display:flex; align-items:center; justify-content:space-between;
  gap: 12px; margin-bottom: 12px;
}
.ps-related__t{ font-size: 14px; font-weight: 600; color:#0f172a; }
.ps-related__d{
  font-size: 13px;
  font-weight: 500;
  color:#64748b;
  margin-top: 4px;
  max-width: 70ch;
}
.ps-related__grid{ display:grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 768px){ .ps-related__grid{ grid-template-columns: repeat(3, 1fr); } }

.ps-rCard{
  text-decoration:none;
  color:inherit;
  border:1px solid #e2e8f0;
  background:#fff;
  border-radius: 24px;
  overflow:hidden;
  box-shadow: 0 2px 12px rgba(2,6,23,.08);
  transition: transform .15s ease, box-shadow .15s ease;
}
.ps-rCard:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(2,6,23,.14);
}
.ps-rImg{
  aspect-ratio: 16/9;
  background:#f1f5f9 center/contain no-repeat;
  position: relative;
}
.ps-rImg::after{
  content:"";
  position:absolute; inset:auto 0 0 0;
  height: 64px;
  background: linear-gradient(to top, rgba(15,23,42,.55), transparent);
}
.ps-rTag{
  position:absolute; left: 10px; bottom: 10px;
  background: rgba(255,255,255,.92);
  border:1px solid #e2e8f0;
  padding:6px 10px;
  border-radius:999px;
  font-size: 13px;
  font-weight: 600;
  color:#334155;
}
.ps-rBody{ padding: 12px; }
.ps-rTitle{ font-weight: 600; font-size: 13px; line-height: 1.4; color:#0f172a; }
.ps-rMeta{ margin-top: 6px; font-size: 13px; color:#64748b; font-weight: 500; }

/* End CTA */
.ps-endCta{
  margin-top: 14px;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius: 24px;
  padding: 16px;
  display:flex; gap: 12px;
  align-items:center; justify-content:space-between;
  box-shadow: 0 2px 12px rgba(2,6,23,.08);
}
.ps-endCta__t{ font-size: 14px; font-weight: 600; color:#0f172a; }
.ps-endCta__d{
  margin-top: 4px;
  font-size: 13px;
  color:#64748b;
  font-weight: 500;
  line-height: 1.55;
  max-width: 70ch;
}

/* Overlays */
.ps-overlay{
  position: fixed; inset: 0;
  background: rgba(15,23,42,.35);
  display:none;
  z-index: 9998;
}
.ps-overlay.is-open{ display:block; }

.ps-sheet{
  position:absolute; left:0; right:0; bottom:0;
  background:#fff;
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  border:1px solid #e2e8f0;
  max-height: 74vh;
  overflow:hidden;
  box-shadow: 0 -18px 38px rgba(2,6,23,.18);
}
.ps-sheet__head{
  display:flex; justify-content:space-between; align-items:center;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
}
.ps-sheet__title{ font-weight: 600; color:#0f172a; }
.ps-sheet__body{ padding: 14px 16px; overflow:auto; max-height: calc(74vh - 60px); }

.ps-sheetItem{
  width:100%;
  text-align:left;
  display:flex; align-items:center;
  padding: 12px;
  border-radius: 18px;
  border:1px solid #e2e8f0;
  background:#fff;
  cursor:pointer;
  margin-bottom: 8px;
  font-weight: 600;
}
.ps-sheetItem:hover{ background:#f8fafc; }

/* AI Drawer */
.ps-drawer{
  position:absolute; top:0; right:0;
  height: 100%;
  width: min(460px, 92vw);
  background:#fff;
  border-left: 1px solid #e2e8f0;
  box-shadow: -12px 0 30px rgba(2,6,23,.18);
  display:flex; flex-direction:column;
}
.ps-drawer__head{
  display:flex; justify-content:space-between; align-items:center;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
}
.ps-drawer__ttl{ display:flex; gap: 8px; align-items:baseline; font-weight: 600; }
.ps-drawer__ttl span{ color:#64748b; font-weight: 500; font-size: 13px; }
.ps-drawer__body{ padding: 14px 16px; overflow:auto; }

.ps-aiLabel{
  font-size: 13px;
  font-weight: 600;
  color:#64748b;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 12px 0 8px;
}
.ps-aiChips{ display:flex; flex-wrap:wrap; gap: 8px; }
.ps-chipBtn{
  border:1px solid #e2e8f0;
  background:#fff;
  border-radius: 18px;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 13px;
  cursor:pointer;
  box-shadow: 0 1px 8px rgba(2,6,23,.06);
}
.ps-chipBtn:hover{ background:#f8fafc; }

.ps-aiAnswer{
  border:1px solid #e2e8f0;
  background:#f8fafc;
  border-radius: 18px;
  padding: 12px;
  font-weight: 500;
  font-size: 13px;
  color:#0f172a;
  line-height: 1.6;
}
.ps-aiInput{ display:flex; gap: 10px; margin-top: 12px; }
.ps-aiNote{ margin-top: 10px; font-size: 13px; color:#64748b; font-weight: 500; }

/* Toast */
.ps-toast{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 18px;
  background:#fff;
  color:#0f172a;
  border:1px solid #e2e8f0;
  border-radius: 18px;
  padding: 10px 12px;
  display:none;
  align-items:center;
  gap: 10px;
  z-index: 10000;
  box-shadow: 0 18px 34px rgba(2,6,23,.16);
}
.ps-toast.is-open{ display:flex; }
.ps-toast__msg{ font-weight: 500; font-size: 14px; color:#0f172a; }
.ps-toast__x{
  border:0;
  background: #f1f5f9;
  color:#334155;
  width: 30px; height: 30px;
  border-radius: 12px;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
}
.ps-toast__x:hover{ background:#e2e8f0; }

/* Reading mode */
.ps.is-reading .ps-grid{ grid-template-columns: 1fr; }
.ps.is-reading .ps-side{ display:none; }
.ps.is-reading .ps-article p{ font-size: 17px; line-height: 1.85; }

/* No-scroll helper */
body.ps-noscroll{ overflow:hidden; }
/* Lżejsze fonty (było za grubo) */
.ps,
.ps p,
.ps li,
.ps-lead,
.ps-related__d,
.ps-card__hint {
  font-weight: 400;
}

.ps-title,
.ps-card__title,
.ps-premium__t,
.ps-related__t,
.ps-rTitle {
  font-weight: 600;
}

/* TOC: sticky card nie może wypychać sidebara */
.ps-card--toc {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 120px); /* dopasuj pod swój topbar */
}

.ps-card--toc .ps-toc {
  overflow: auto;
  min-height: 0; /* kluczowe dla flex scroll */
  padding-right: 6px;
}

/* Premium note */
.ps-premium__note {
  margin-top: 8px;
  font-size: 13px;
  color: #64748b;
}

/* Toast class jeśli nie masz */
.ps-toast.is-on { opacity: 1; transform: translateY(0); pointer-events: auto; }
