/*
Theme Name: Miedza i Umowa
Theme URI: https://dograne.pl
Author: Miedza i Umowa
Description: Praktyczny poradnik o umowach, rozliczeniach i współpracy w gospodarstwie
Version: 1.5
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: miedza-i-umowa
*/

/* 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; } }

/* Miedza i Umowa: odwazna decyzja "Miedza" (pas niezaoranej trawy jako granica dzialek miedzy kolumnami) */
:root { --mu-miedza: 6px; --mu-rule: #D3D7CB; }
.wpm-hero-strip { margin: 0 0 0.5rem; }
.wpm-hero-strip img { display: block; width: 100%; height: clamp(140px, 18vw, 240px); object-fit: cover; object-position: center 48%; border-radius: 0; }
.wpm-hero-glowny > .wp-block-column:last-child,
.wpm-with-sidebar > .wp-block-column:last-child {
  border-left: var(--mu-miedza) solid var(--wp--preset--color--primary);
  box-shadow: -2px 0 0 var(--wp--preset--color--accent);
  padding-left: clamp(1.25rem, 2.4vw, 2.25rem);
}
@media (max-width: 781px) {
  .wpm-hero-glowny > .wp-block-column:last-child,
  .wpm-with-sidebar > .wp-block-column:last-child {
    border-left: 0; box-shadow: 0 -2px 0 var(--wp--preset--color--accent);
    border-top: var(--mu-miedza) solid var(--wp--preset--color--primary);
    padding-left: 0; padding-top: 1.5rem; margin-top: 0.5rem;
  }
}

/* typografia */
.wpm-home-h1 { font-size: clamp(2rem, 3.6vw, 3rem); max-width: 24ch; line-height: 1.12; margin-bottom: 0.6rem; }
h1, h2, h3, .wp-block-post-title { text-wrap: balance; }
p, li { text-wrap: pretty; }
.wpm-home-lead { color: var(--wp--preset--color--muted); line-height: 1.5; }
.wpm-section-head, .wpm-aside-title { border-bottom-width: 1px; }
.wpm-masthead-kompaktowy { padding-block: 0.6rem; gap: 1.5rem; }
.wpm-header .wp-block-navigation { font-weight: 500; }
.wpm-header .wp-block-navigation a:hover { text-decoration: underline; text-decoration-color: var(--wp--preset--color--primary); text-underline-offset: 0.3em; text-decoration-thickness: 2px; }

/* linki w tresci i fokus */
.wp-block-post-content a { text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.wp-block-post-content a:hover { text-decoration-thickness: 2px; }
.wp-block-post-title a, .wpm-section-more a, .wpm-silos a, .wpm-footer a { text-decoration: none; }
.wp-block-post-title a:hover, .wpm-section-more a:hover, .wpm-footer a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
:where(a, button, input, .wp-element-button):focus-visible { outline: 3px solid var(--wp--preset--color--contrast); outline-offset: 2px; }

/* tresc wpisu: cytat, figury, tabele stawek */
.wp-block-post-content blockquote, .wp-block-quote { border-left: 4px solid var(--wp--preset--color--primary); padding: 0.2rem 0 0.2rem 1.2rem; margin-inline: 0; font-family: var(--wp--preset--font-family--spectral); font-size: var(--wp--preset--font-size--large); }
.wp-block-quote cite { font-family: var(--wp--preset--font-family--ibm-plex-sans); font-size: var(--wp--preset--font-size--small); font-style: normal; color: var(--wp--preset--color--muted); }
.wp-block-post-content figure { margin-block: 2rem; }
.wp-block-post-content figure img { border-radius: 2px; }
.wp-block-post-content figcaption { margin-top: 0.5rem; }
.wp-block-table table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 0.95em; }
.wp-block-table th { background: var(--wp--preset--color--surface); text-align: left; font-weight: 600; }
.wp-block-table th, .wp-block-table td { border: 1px solid var(--mu-rule); padding: 0.55rem 0.7rem; vertical-align: top; }
.wp-block-table figcaption { text-align: left; }

/* pasy i listy */
.wpm-textrow .wp-block-post-date { flex: 0 0 7rem; font-variant-numeric: tabular-nums; color: var(--wp--preset--color--muted); padding-top: 0.2rem; }
.wpm-textrow .wp-block-post-title { margin: 0; }
.wpm-hero-main .wp-block-post-featured-image img, .wpm-section .wp-block-post-featured-image img { border-radius: 2px; }
.wpm-trust { max-width: 70ch; }
.wpm-footer-note { max-width: 36ch; }
.wp-site-blocks > footer { margin-block-start: 0; }
@media (max-width: 600px) { .wpm-header .wp-block-search { display: none; } .wpm-textrow .wp-block-post-date { flex-basis: 5.5rem; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }
