/*
Theme Name: Czytam Skład
Theme URI: https://ebeautystore.pl
Author: Czytam Skład
Description: Poradnik o tym, co jest w kosmetykach i jak to wykorzystać w codziennej pielęgnacji
Version: 1.7
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: czytam-sklad
*/

/* ramka wstepu (BLUF) i box TL;DR */
.wpm-bluf, .tldr { border-left: 4px solid var(--wp--preset--color--primary); border-radius: 0 6px 6px 0; padding: 1.25rem 1.5rem; margin-bottom: 2rem; }
.wpm-bluf > * { margin-left: 0 !important; margin-right: 0 !important; max-width: none; }
.wpm-bluf .wpm-bluf-label { margin: 0 0 0.5em; font-family: var(--wp--preset--font-family--schibsted-grotesk); font-weight: 700; color: var(--wp--preset--color--primary); }
.wpm-bluf p { line-height: 1.6; }
.wpm-bluf p:last-child, .wpm-bluf ul:last-child { margin-bottom: 0; }

/* portal kit: uklad klockow (kolory i fonty z theme.json) */
.wpm-header { border-bottom: 1px solid var(--wp--preset--color--surface); }
.wpm-masthead-kompaktowy { z-index: 20; }
.wpm-servicebar { padding-block: 0.4rem; }
.wpm-brand .wp-block-site-title { margin: 0; }
/* logo (znak albo znak z nazwa) zastepuje nazwe: site-title tylko dla czytnikow i SEO (wydawca 2026-10-08: przy rebrandingu sam znak, bez napisu) */
.wpm-brand:has(.wp-block-site-logo img) .wp-block-site-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wpm-kicker { margin-block: 1.5rem 1rem; }
.wpm-home-h1 { max-width: 22ch; }
.wpm-home-lead { max-width: 60ch; }
.wpm-trust { border-block: 1px solid var(--wp--preset--color--surface); padding-block: 0.6rem; margin-block: 1rem 2rem; }
.wpm-trust-masthead { border: 0; margin: 0; padding: 0; }
.wpm-trust-kafle > p { padding: 0.6rem 1rem; margin: 0; }
.wpm-section { margin-block: 2.5rem; }
.wpm-section-head { border-bottom: 2px solid var(--wp--preset--color--contrast); padding-bottom: 0.4rem; margin-bottom: 1rem; align-items: baseline; }
.wpm-section-title { margin: 0; }
.wpm-mini > .wp-block-column:first-child img { border-radius: 3px; }
.wpm-textrow { border-bottom: 1px solid var(--wp--preset--color--surface); padding-block: 0.5rem; }
.wpm-meta { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }
.wpm-meta .wp-block-avatar img { border-radius: 50%; }
.wpm-sidebar { position: sticky; top: 1rem; align-self: start; }
.wpm-aside-title { font-size: var(--wp--preset--font-size--large); border-bottom: 2px solid var(--wp--preset--color--contrast); padding-bottom: 0.3rem; margin-bottom: 0.8rem; }
.wpm-most-read .wp-block-post-template { counter-reset: wpm; list-style: none; padding: 0; }
.wpm-most-read .wp-block-post { counter-increment: wpm; display: grid; grid-template-columns: 2rem 1fr; gap: 0.5rem; padding-block: 0.5rem; border-bottom: 1px solid var(--wp--preset--color--surface); }
.wpm-most-read .wp-block-post::before { content: counter(wpm); font-family: var(--wp--preset--font-family--heading, inherit); font-size: var(--wp--preset--font-size--x-large); line-height: 1; color: var(--wp--preset--color--muted); }
.wpm-silos, .wpm-footer-silos { list-style: none; padding: 0; margin: 0; }
.wpm-silos li, .wpm-footer-silos li { padding-block: 0.25rem; }
.wpm-single-head { margin-block: 1rem 1.5rem; }
.wpm-kicker-cat { font-size: var(--wp--preset--font-size--small); }
.wpm-lead { font-size: var(--wp--preset--font-size--large); color: var(--wp--preset--color--muted); }
.wpm-breadcrumbs { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }
.wpm-breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0 0 0.8rem; }
.wpm-breadcrumbs li + li::before { content: "/"; margin-right: 0.4rem; color: var(--wp--preset--color--muted); }
.wpm-toc { border: 1px solid var(--wp--preset--color--surface); background: var(--wp--preset--color--surface); padding: 1rem 1.25rem; margin: 0 0 2rem; }
.wpm-toc ol { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.wpm-author-box { margin-block: 2.5rem; border-radius: 3px; }
.wpm-author-box .wp-block-avatar img { border-radius: 50%; }
.wpm-prevnext { border-top: 1px solid var(--wp--preset--color--surface); padding-top: 1rem; }
.wpm-hub-head { margin-block: 1.5rem; }
.wpm-hub-list .wp-block-post:nth-child(-n+3) .wp-block-post-title { font-size: var(--wp--preset--font-size--large); }
.wpm-footer-title { font-size: var(--wp--preset--font-size--medium); margin-bottom: 0.6rem; }
.wpm-footer .wp-block-navigation { font-size: var(--wp--preset--font-size--small); }
.wpm-copy { margin-top: 2rem; }
@media (max-width: 781px) { .wpm-sidebar { position: static; } .wpm-hero-small .wp-block-post-template { grid-template-columns: 1fr; } }

/* Czytam Skład: tylna etykieta (v1.4) */
:root {
  --cs-inci: "Skład (INCI): Aqua, Glycerin, Butyrospermum Parkii Butter, Caprylic/Capric Triglyceride, Niacinamide, Ceramide NP, Squalane, Panthenol, Aloe Barbadensis Leaf Juice, Lawsonia Inermis Leaf Powder, Sodium Hyaluronate, Allantoin, Bisabolol, Tocopherol, Citric Acid.";
  --cs-line: 1px solid var(--wp--preset--color--contrast);
}
body { text-rendering: optimizeLegibility; }
h1, h2, h3, .wp-block-post-title { text-wrap: balance; }
p, li { text-wrap: pretty; }

.wpm-kicker, .wpm-hub-head {
  position: relative;
  border: var(--cs-line);
  border-radius: 3px;
  background: var(--wp--preset--color--base);
  padding: clamp(1.1rem, 3vw, 1.9rem) clamp(1.1rem, 3.4vw, 2.2rem) 0;
  margin-block: 1.75rem 1.5rem;
}
.wpm-kicker::before, .wpm-hub-head::before {
  content: "";
  position: absolute; inset: 5px;
  border: 1px solid var(--wp--preset--color--secondary);
  border-radius: 2px;
  pointer-events: none;
}
.wpm-home-h1, .wpm-hub-h1 {
  font-size: clamp(2rem, 1.35rem + 2.6vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.022em;
  max-width: 20ch;
  margin-block: 0 0.9rem;
}
.wpm-home-lead, .wpm-hub-lead { max-width: 58ch; color: var(--wp--preset--color--muted); }
.wpm-kicker::after, .wpm-hub-head::after {
  content: var(--cs-inci);
  content: var(--cs-inci) / "";
  display: block;
  margin: 1.1rem calc(-1 * clamp(1.1rem, 3.4vw, 2.2rem)) 0;
  padding: 0.6rem clamp(1.1rem, 3.4vw, 2.2rem) 0;
  border-bottom: 0.7rem solid var(--wp--preset--color--base);
  border-top: var(--cs-line);
  font-family: var(--wp--preset--font-family--schibsted-grotesk);
  font-size: 0.74rem;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--wp--preset--color--accent);
  max-height: 3em;
  box-sizing: content-box;
  overflow: hidden;
  position: relative; z-index: 1;
  background: var(--wp--preset--color--base);
}
.wpm-hub-head .wpm-breadcrumbs { position: relative; }
.wpm-hub-head .trust-bar { border: 0; padding: 0; margin: 0.4rem 0 0; }

.wpm-hero { margin-top: 0.5rem; }
.wpm-hero-main .wp-block-post-featured-image img,
.wpm-section .wp-block-post-featured-image img,
.wpm-hub-list .wp-block-post-featured-image img { border-radius: 3px; }
.wpm-hero-main .wp-block-post-title { margin-top: 0.9rem; }
.wpm-section-head { border-bottom: var(--cs-line); }
.wpm-section-title { font-size: var(--wp--preset--font-size--x-large); }
.wpm-section-more a { text-decoration: none; font-family: var(--wp--preset--font-family--schibsted-grotesk); }
.wpm-section-more a:hover { text-decoration: underline; }
.wpm-aside-title { border-bottom: var(--cs-line); font-size: var(--wp--preset--font-size--medium); }
.wpm-most-read .wp-block-post::before { color: var(--wp--preset--color--accent); font-weight: 700; }
.wpm-trust { border-block: 1px solid var(--wp--preset--color--secondary); }
.wpm-meta, .wpm-breadcrumbs, .wp-block-post-date, .wpm-kicker-cat { font-family: var(--wp--preset--font-family--schibsted-grotesk); }
.wpm-meta { gap: 0.35rem 1rem; }
.wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--contrast); }
.wp-block-post-title a:hover { color: var(--wp--preset--color--primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }

.wp-block-navigation { font-family: var(--wp--preset--font-family--schibsted-grotesk); font-weight: 700; font-size: 0.95rem; }
.wpm-header .wp-block-navigation-item__content { text-decoration: none; padding-block: 0.25rem; border-bottom: 2px solid transparent; }
.wpm-header .wp-block-navigation-item__content:hover,
.wpm-header .current-menu-item > .wp-block-navigation-item__content { border-bottom-color: var(--wp--preset--color--primary); }
.wpm-header { border-bottom: var(--cs-line); }
.wpm-masthead { padding-block: 0.7rem; gap: 0.8rem 1.5rem; }

.wpm-article .wp-block-post-content a,
.wpm-footer-note a, .wpm-sidebar p a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: color-mix(in srgb, var(--wp--preset--color--primary) 55%, transparent);
}
.wpm-article .wp-block-post-content a:hover { text-decoration-color: currentColor; }
.wpm-article .wp-block-post-content > * { max-width: 700px; }
.wpm-article .wp-block-post-content h2 { font-size: var(--wp--preset--font-size--x-large); margin-top: 2.4rem; }
.wpm-article .wp-block-post-content h3 { font-size: var(--wp--preset--font-size--large); margin-top: 1.8rem; }
.wpm-article blockquote, .wp-block-quote {
  border-left: 2px solid var(--wp--preset--color--contrast);
  margin-inline: 0; padding: 0.2rem 0 0.2rem 1.25rem;
  font-style: italic;
}
.wp-block-quote cite { font-style: normal; font-family: var(--wp--preset--font-family--schibsted-grotesk); font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }
.wpm-article figure { margin-block: 1.8rem; }
.wpm-article figure img { border-radius: 3px; }
.wpm-article figcaption, .wp-element-caption {
  font-family: var(--wp--preset--font-family--schibsted-grotesk);
  font-size: 0.82rem; line-height: 1.45;
  color: var(--wp--preset--color--muted);
  border-top: 1px solid var(--wp--preset--color--secondary);
  padding-top: 0.45rem; margin-top: 0.5rem; text-align: left;
}
.wpm-article table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 0.95em; }
.wpm-article th, .wpm-article td { border-bottom: 1px solid var(--wp--preset--color--secondary); padding: 0.5rem 0.6rem; text-align: left; vertical-align: top; }
.wpm-article thead th { border-bottom: var(--cs-line); font-family: var(--wp--preset--font-family--schibsted-grotesk); }
.wpm-bluf, .tldr { background: var(--wp--preset--color--secondary); border-left-color: var(--wp--preset--color--primary); }
.wpm-toc { background: transparent; border: var(--cs-line); border-radius: 3px; font-family: var(--wp--preset--font-family--schibsted-grotesk); font-size: 0.95rem; }
.wpm-toc a { text-decoration: none; }
.wpm-toc a:hover { text-decoration: underline; }
.wpm-author-box { background: var(--wp--preset--color--surface); border-top: var(--cs-line); }

.wpm-footer-inner::before {
  content: var(--cs-inci);
  content: var(--cs-inci) / "";
  display: block;
  font-family: var(--wp--preset--font-family--schibsted-grotesk);
  font-size: 0.72rem; line-height: 1.5;
  color: var(--wp--preset--color--accent);
  padding-bottom: 0; margin-bottom: 0.8rem;
  max-height: 3em; box-sizing: content-box; overflow: hidden;
}
.wpm-footer-note { margin-top: 2rem; max-width: 60ch; font-family: var(--wp--preset--font-family--schibsted-grotesk); font-weight: 700; }
.wpm-footer .wpm-copy { margin-top: 0.4rem; }
.wpm-footer a { color: var(--wp--preset--color--contrast); }
.wp-site-blocks > footer { margin-block-start: 0; }

:where(a, button, input, .wp-block-button__link, .wp-block-navigation-item__content):focus-visible {
  outline: 2px solid var(--wp--preset--color--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
@media (max-width: 600px) {
  .wpm-masthead .wp-block-search { flex-basis: 100%; }
  .wpm-home-h1, .wpm-hub-h1 { max-width: none; }
  .wpm-kicker::after, .wpm-hub-head::after { max-height: 6em; }
  .wpm-footer-inner::before { max-height: 4.5em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
.wpm-hero-photo img { border-radius: 3px; width: 100%; }
.wpm-footer-silos { font-family: var(--wp--preset--font-family--schibsted-grotesk); font-size: var(--wp--preset--font-size--small); }
.wpm-footer-silos a { text-decoration: none; }
.wpm-footer-silos a:hover { text-decoration: underline; color: var(--wp--preset--color--primary); }
.wpm-footer-silos li { padding-block: 0.2rem; }
.wpm-footer-cols { border-top: var(--cs-line); padding-top: 2rem; }
