/*
Theme Name: Mięsny Zeszyt
Theme URI: https://wieprzopedia.pl
Author: Mięsny Zeszyt
Description: Wieprzowina w kuchni: części, czasy, temperatury
Version: 1.9
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: miesny-zeszyt
*/

/* 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; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.7; }
.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; } }

/* ===== Miesny Zeszyt: kratka z zeszytu tylko tam, gdzie zapisuje sie liczby ===== */
:root {
  --mz-grid: 20px;
  --mz-line: var(--wp--preset--color--secondary);
  --mz-kratka: linear-gradient(var(--mz-line) 1px, transparent 1px), linear-gradient(90deg, var(--mz-line) 1px, transparent 1px);
}
body { font-feature-settings: "kern"; }
h1, h2, h3, .wp-block-post-title { text-wrap: balance; }
p, li { text-wrap: pretty; }
.wp-site-blocks > footer { margin-block-start: 0; }

/* linki i fokus */
.wpm-main p a, .wp-block-post-content a, .wpm-footer a, .wpm-silos a {
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, var(--wp--preset--color--primary) 45%, transparent);
}
.wpm-main p a:hover, .wp-block-post-content a:hover, .wpm-footer a:hover, .wpm-silos a:hover { text-decoration-color: var(--wp--preset--color--accent); text-decoration-thickness: 2px; }
.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: 2px; text-underline-offset: 0.18em; text-decoration-color: var(--wp--preset--color--accent); }
:where(a, button, input, summary, .wp-element-button):focus-visible { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 3px; border-radius: 2px; }

/* naglowek */
.wpm-servicebar { padding-inline: 0.9rem; color: var(--wp--preset--color--muted); }
.wpm-servicebar .wp-block-search__input { min-width: 14rem; border-radius: 3px; border-color: var(--mz-line); background: var(--wp--preset--color--base); }
.wpm-brandrow { padding-block: 0.9rem; }
.wpm-brandrow .wp-block-navigation { font-family: var(--wp--preset--font-family--red-hat-display); font-weight: 700; gap: 1.4rem; }
.wpm-brandrow .wp-block-navigation a { text-decoration: none; padding-block: 0.3rem; border-bottom: 2px solid transparent; }
.wpm-brandrow .wp-block-navigation a:hover, .wpm-brandrow .wp-block-navigation .current-menu-item > a { border-bottom-color: var(--wp--preset--color--primary); }
.wpm-header { border-bottom: 1px solid var(--mz-line); }

/* odwazna decyzja: kartka w kratke pod H1 strony glownej i huba */
.wpm-hero-split { align-items: stretch; gap: 0; margin-block: 2rem 0; border: 1px solid var(--mz-line); }
.wpm-hero-split > .wp-block-column:first-child {
  background-color: var(--wp--preset--color--base); background-image: var(--mz-kratka);
  background-size: var(--mz-grid) var(--mz-grid); background-position: -1px -1px;
  padding: calc(var(--mz-grid) * 2) calc(var(--mz-grid) * 2) calc(var(--mz-grid) * 2.5);
  display: flex; flex-direction: column; justify-content: center;
}
.wpm-hero-split .wpm-kicker { margin: 0 0 1.5rem; }
.wpm-home-h1 { font-size: clamp(2rem, 1.2rem + 2.6vw, 3.1rem); line-height: 1.08; letter-spacing: -0.02em; max-width: 17ch; margin-bottom: 1rem; }
.wpm-home-lead { max-width: 44ch; color: var(--wp--preset--color--contrast); line-height: 1.5; }
.wpm-hero-split .wp-block-button__link { padding: 0.8rem 1.4rem; }
.mz-hero-photo { margin: 0; height: 100%; }
.mz-hero-photo img { width: 100%; height: 100%; min-height: 20rem; display: block; object-fit: cover; }
.wpm-hub-head {
  background-color: var(--wp--preset--color--base); background-image: var(--mz-kratka);
  background-size: var(--mz-grid) var(--mz-grid); background-position: -1px -1px;
  border: 1px solid var(--mz-line); padding: calc(var(--mz-grid) * 1.5) calc(var(--mz-grid) * 2);
  margin-block: 2rem 2.5rem;
}
.wpm-hub-h1 { font-size: clamp(1.9rem, 1.3rem + 2vw, 2.7rem); max-width: 22ch; }
.wpm-hub-lead { max-width: 60ch; }
.wpm-hub-head .wpm-trust { border: 0; margin-block: 1rem 0; padding: 0; }

/* pasek zaufania pod hero, zdaniami */
.wpm-trust-linia { border-block: 0; border-bottom: 1px solid var(--mz-line); margin-block: 0 2.5rem; padding: 0.8rem 0; }

/* pasy dzialow */
.wpm-section-head { border-bottom: 2px solid var(--wp--preset--color--contrast); }
.wpm-section-title { font-size: var(--wp--preset--font-size--x-large); }
.wpm-section-more a { text-decoration: underline; text-underline-offset: 0.2em; }
.wpm-section .wp-block-post-featured-image img, .wpm-hub-list .wp-block-post-featured-image img { border-radius: 3px; }
.wpm-section .wp-block-post-excerpt { color: var(--wp--preset--color--muted); }
.wpm-section-sam_tekst .wpm-textrow { gap: 1.25rem; align-items: baseline; border-bottom: 1px dashed var(--mz-line); }
.wpm-section-sam_tekst .wp-block-post-date { flex: 0 0 7.5rem; font-variant-numeric: tabular-nums; color: var(--wp--preset--color--muted); }
.wpm-section-sam_tekst .wp-block-post-title { margin: 0; }
.wpm-aside-title { font-size: var(--wp--preset--font-size--large); }
.wpm-most-read .wp-block-post::before { color: var(--wp--preset--color--primary); font-weight: 700; font-variant-numeric: tabular-nums; }

/* wpis: liczby w tabelach na tej samej kratce */
.wp-block-post-content .wp-block-table { margin-block: 2rem; overflow-x: auto; }
.wp-block-post-content .wp-block-table table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums lining-nums; font-size: 0.95em; background-image: var(--mz-kratka); background-size: var(--mz-grid) var(--mz-grid); background-color: var(--wp--preset--color--base); }
.wp-block-post-content .wp-block-table th, .wp-block-post-content .wp-block-table td { border: 1px solid var(--mz-line); padding: 0.55rem 0.8rem; text-align: left; vertical-align: top; }
.wp-block-post-content .wp-block-table thead th, .wp-block-post-content .wp-block-table th { background: var(--wp--preset--color--surface); font-family: var(--wp--preset--font-family--red-hat-display); font-weight: 700; }
.wp-block-post-content .wp-block-table td { background: color-mix(in srgb, var(--wp--preset--color--base) 82%, transparent); }
.wp-block-post-content .wp-block-table figcaption { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }
.wp-block-post-content h2 { font-size: var(--wp--preset--font-size--xx-large); margin-top: 2.6rem; }
.wp-block-post-content h3 { font-size: var(--wp--preset--font-size--large); margin-top: 2rem; }
.wp-block-post-content li + li { margin-top: 0.35rem; }
.wp-block-quote { border-left: 3px solid var(--wp--preset--color--primary); padding: 0.2rem 0 0.2rem 1.25rem; margin-inline: 0; font-family: var(--wp--preset--font-family--red-hat-display); font-size: var(--wp--preset--font-size--large); line-height: 1.4; }
.wp-block-quote cite { display: block; margin-top: 0.6rem; font-family: var(--wp--preset--font-family--red-hat-text); font-size: var(--wp--preset--font-size--small); font-style: normal; color: var(--wp--preset--color--muted); }
.wp-block-image figcaption, .wp-block-post-content figcaption { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); margin-top: 0.5rem; }
.wp-block-post-content .wp-block-image img { border-radius: 3px; }
.wpm-single .wp-block-post-featured-image img { border-radius: 3px; }
.wpm-kicker-cat a { text-decoration: none; font-weight: 600; color: var(--wp--preset--color--primary); border-bottom: 2px solid var(--wp--preset--color--secondary); }
.wpm-bluf, .tldr { background: var(--wp--preset--color--surface); border-left-color: var(--wp--preset--color--primary); }
.wpm-bluf .wpm-bluf-label { text-transform: none; letter-spacing: 0; opacity: 1; font-weight: 700; font-family: var(--wp--preset--font-family--red-hat-display); }
.wpm-toc { background: var(--wp--preset--color--base); border: 1px solid var(--mz-line); }
.wpm-author-box { border: 1px solid var(--mz-line); }
.wpm-related-wrap { margin-block: 3rem 2rem; }

/* stopka */
.wpm-footer { border-top: 1px solid var(--mz-line); }
.wpm-footer-title { font-size: var(--wp--preset--font-size--medium); }

/* mobile do 390 px */
@media (max-width: 781px) {
  .wpm-hero-split { margin-top: 1rem; }
  .wpm-hero-split > .wp-block-column:first-child { padding: 1.5rem 1.25rem 2rem; }
  .mz-hero-photo img { min-height: 0; aspect-ratio: 3/2; }
  .wpm-hub-head { padding: 1.25rem; }
  .wpm-servicebar .wp-block-search__input { min-width: 0; }
  .wpm-section-sam_tekst .wpm-textrow { flex-wrap: wrap; gap: 0.2rem 1rem; }
  .wpm-section-sam_tekst .wp-block-post-date { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
