/* ==========================================================================
   PawHaven — single.css: article template. Scrapbook lives around the
   article; the reading column itself stays calm and clean.
   ========================================================================== */

/* Reading progress: dog chases the ball */
.read-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 70; height: 30px; pointer-events: none; }
.read-progress .rp-track { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--pet); transform-origin: left; transform: scaleX(var(--p, 0)); }
.read-progress .rp-runner { position: absolute; top: 3px; left: 0; width: 100%; height: 24px; transform: translateX(calc(var(--p, 0) * (100% - 64px))); }
.read-progress .rp-dog { position: absolute; left: 0; top: 0; width: 34px; height: 24px; color: var(--text); }
.read-progress .rp-dog .legs { animation: ph-trot .22s ease-in-out infinite alternate; }
.read-progress .rp-ball { position: absolute; left: 44px; top: 9px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: inset -2px -2px 0 rgba(0,0,0,.15); transition: transform 300ms var(--ease-spring); animation: ph-bounce .3s ease-in-out infinite alternate; }
.read-progress.is-done .rp-ball { transform: translate(-16px, -2px) scale(.9); animation: none; }
.read-progress.is-idle .rp-dog .legs { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .read-progress .rp-runner { display: none; } }

.article-wrap { padding-top: clamp(24px, 4vw, 48px); }
.article-head { max-width: 860px; margin-bottom: 28px; }
.article-head h1 { font-size: clamp(2.125rem, 1.5rem + 2.6vw, 3.5rem); line-height: 1.08; letter-spacing: -.025em; margin: 14px 0 18px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; color: var(--muted); font-weight: 700; font-size: .9375rem; }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-meta .i { width: 16px; height: 16px; }
.article-meta .avatar { width: 36px; height: 36px; border-radius: 50%; }
.article-meta a { color: var(--text); text-decoration: none; }
.article-hero { position: relative; margin: 0 0 36px; padding: 12px 12px 14px; background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow-md); transform: rotate(-.4deg); }
.article-hero img { width: 100%; border-radius: 6px; aspect-ratio: 16 / 9; object-fit: cover; }
.article-hero figcaption { margin-top: 10px; }

.article-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr) 320px; gap: clamp(24px, 3vw, 48px); align-items: start; }
.article-grid .sidebar { grid-column: 3; }
.article-grid.no-toc { grid-template-columns: minmax(0, 1fr) 320px; }
.article-grid.no-toc .sidebar { grid-column: 2; grid-row: auto; }
.article-main { min-width: 0; }
.article-hero { max-width: 980px; }
@media (max-width: 1024px) { .article-grid.no-toc { grid-template-columns: 1fr; } .article-grid.no-toc .sidebar { grid-column: auto; } }
@media (max-width: 1240px) { .article-grid { grid-template-columns: minmax(0, 1fr) 320px; } .toc { grid-column: 1; } .article-grid .sidebar { grid-column: 2; grid-row: 1 / span 3; } }
@media (max-width: 1024px) { .article-grid { grid-template-columns: 1fr; } .article-grid .sidebar { grid-column: auto; grid-row: auto; position: static; } }

/* Table of contents */
.toc { position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow: auto; padding: 18px; background: var(--kraft) var(--paper); border-radius: var(--r-md); font-size: .9375rem; }
.toc summary { display: flex; align-items: center; gap: 8px; min-height: 44px; font-family: var(--f-head); font-variation-settings: "SOFT" 100, "WONK" 1; font-weight: 800; font-size: 1.125rem; cursor: pointer; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary .chev { margin-left: auto; transition: transform var(--dur); }
.toc details[open] summary .chev { transform: rotate(180deg); }
.toc ol { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: toc; }
.toc li { margin: 0; }
.toc a { display: block; padding: 6px 10px; border-left: 3px solid transparent; color: var(--kraft-ink); text-decoration: none; line-height: 1.4; font-weight: 700; border-radius: 0 6px 6px 0; }
.toc a:hover { color: var(--text); background: rgba(255,255,255,.35); }
.toc a.is-active { border-color: var(--pet); color: var(--text); background: rgba(255,255,255,.5); }
[data-theme="dark"] .toc a:hover, [data-theme="dark"] .toc a.is-active { background: rgba(255,255,255,.06); }
.toc .toc-h3 a { padding-left: 24px; font-weight: 600; font-size: .875rem; }
@media (max-width: 1240px) { .toc { position: static; max-height: none; margin-bottom: 28px; } }

/* Entry content — clean, readable */
.entry-content { max-width: 70ch; font-size: clamp(1.0625rem, 1rem + .25vw, 1.1875rem); line-height: 1.75; }
.entry-content > * { margin-block: 0 1.25em; }
.entry-content h2 { font-size: clamp(1.625rem, 1.3rem + 1vw, 2.125rem); margin-top: 2em; scroll-margin-top: calc(var(--header-h) + 20px); }
.entry-content h3 { font-size: clamp(1.3125rem, 1.15rem + .5vw, 1.5rem); margin-top: 1.7em; scroll-margin-top: calc(var(--header-h) + 20px); }
.entry-content h4 { font-size: 1.1875rem; margin-top: 1.5em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li { margin-bottom: .45em; }
.entry-content ul li::marker { color: var(--pet); }
.entry-content ol li::marker { color: var(--pet-ink); font-weight: 800; }
.entry-content img { border-radius: var(--r-md); }
.entry-content figure { margin-inline: 0; }
.entry-content hr { border: 0; height: 14px; margin: 2.5em 0; color: var(--border-strong); background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='14'%3E%3Cpath d='M0 7c6-6 10-6 16 0s10 6 16 0 10-6 16 0' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x center / 48px 14px; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='14'%3E%3Cpath d='M0 7c6-6 10-6 16 0s10 6 16 0 10-6 16 0' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x center / 48px 14px; }
.entry-content blockquote, .entry-content .wp-block-quote {
	position: relative; margin-inline: 0; padding: 20px 24px 20px 64px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--border);
	font-family: var(--f-head); font-variation-settings: "SOFT" 100, "WONK" 0; font-size: 1.25rem; line-height: 1.55; font-style: italic;
}
.entry-content blockquote::before { content: "\201C"; position: absolute; left: 18px; top: 6px; font-size: 3.5rem; line-height: 1; color: var(--pet); font-style: normal; }
.entry-content blockquote p:last-child { margin: 0; }
.entry-content blockquote cite { display: block; margin-top: 8px; font-family: var(--f-body); font-style: normal; font-size: .9375rem; color: var(--muted); font-weight: 700; }
.entry-content pre, .entry-content code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9em; }
.entry-content code { padding: 2px 6px; border-radius: 6px; background: var(--kraft); }
.entry-content pre { padding: 16px; border-radius: var(--r-md); background: var(--kraft); overflow-x: auto; }

/* Responsive tables (breed comparisons) */
.entry-content table, .table-scroll table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9875rem; line-height: 1.5; }
.table-scroll, .entry-content .wp-block-table { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--card); -webkit-overflow-scrolling: touch; }
.entry-content .wp-block-table table { margin: 0; }
.entry-content th, .entry-content td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.entry-content thead th { background: var(--kraft); font-weight: 800; white-space: nowrap; position: sticky; top: 0; }
.entry-content tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--kraft) 30%, transparent); }
.entry-content tbody tr:last-child td { border-bottom: 0; }
.entry-content td:first-child { font-weight: 800; }

/* Callouts: .vet-tip .warning-toxic .quick-fact .pro-tip (class names work on Group blocks via "Additional CSS class", block styles, or shortcode) */
.callout, .is-style-vet-tip, .is-style-warning-toxic, .is-style-quick-fact, .is-style-pro-tip {
	--c: var(--secondary); position: relative; margin: 1.75em 0; padding: 18px 20px 18px 64px; border-radius: var(--r-md);
	background: color-mix(in srgb, var(--c) 12%, var(--card)); border: 2px solid color-mix(in srgb, var(--c) 45%, transparent); font-size: 1.0156rem; line-height: 1.7;
}
.callout > :last-child, [class*="is-style-"] > :last-child { margin-bottom: 0; }
.callout-title { display: block; font-weight: 900; margin-bottom: 4px; font-size: .875rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
.callout::before, .is-style-vet-tip::before, .is-style-warning-toxic::before, .is-style-quick-fact::before, .is-style-pro-tip::before {
	content: ""; position: absolute; left: 16px; top: 18px; width: 32px; height: 32px; border-radius: 50%; background: var(--c);
}
.callout::after, .is-style-vet-tip::after, .is-style-warning-toxic::after, .is-style-quick-fact::after, .is-style-pro-tip::after {
	content: ""; position: absolute; left: 22px; top: 24px; width: 20px; height: 20px; background: #fff;
	-webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}
[data-theme="dark"] .callout::after, [data-theme="dark"] [class*="is-style-"]::after { background: #1A120C; }
.callout.vet-tip, .is-style-vet-tip { --c: #0D9488; --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
.callout.warning-toxic, .is-style-warning-toxic { --c: #DC2626; --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 6v7M12 17.5h.01'/%3E%3C/svg%3E"); }
.callout.quick-fact, .is-style-quick-fact { --c: #A16207; --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 11v6M12 7h.01'/%3E%3C/svg%3E"); }
.callout.pro-tip, .is-style-pro-tip { --c: #EA580C; --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 3l2.6 5.6 6 .7-4.5 4.1 1.2 6L12 16.4 6.7 19.4l1.2-6L3.4 9.3l6-.7z'/%3E%3C/svg%3E"); }
[data-theme="dark"] .callout.vet-tip, [data-theme="dark"] .is-style-vet-tip { --c: #2DD4BF; }
[data-theme="dark"] .callout.warning-toxic, [data-theme="dark"] .is-style-warning-toxic { --c: #F87171; }
[data-theme="dark"] .callout.quick-fact, [data-theme="dark"] .is-style-quick-fact { --c: #FACC15; }
[data-theme="dark"] .callout.pro-tip, [data-theme="dark"] .is-style-pro-tip { --c: #FB923C; }

/* Pros / cons */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 1.75em 0; }
.pros-cons > div { padding: 18px 20px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--border); }
.pros-cons h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 1.125rem; }
.pros-cons ul { list-style: none; margin: 0; padding: 0; }
.pros-cons li { position: relative; padding-left: 28px; margin-bottom: 8px; font-size: 1rem; line-height: 1.55; }
.pros-cons li .i { position: absolute; left: 0; top: 3px; width: 18px; height: 18px; }
.pros-cons .pros { border-top: 5px solid var(--success); } .pros-cons .pros .i { color: var(--success); }
.pros-cons .cons { border-top: 5px solid var(--danger); } .pros-cons .cons .i { color: var(--danger); }
@media (max-width: 600px) { .pros-cons { grid-template-columns: 1fr; } }

/* Product recommendation */
.product-box { position: relative; display: grid; grid-template-columns: 160px 1fr; gap: 20px; align-items: center; margin: 2em 0; padding: 20px; border-radius: var(--r-lg); background: var(--card); border: 2px solid var(--border-strong); box-shadow: var(--shadow-sm); }
.product-box .badge-top { position: absolute; top: -18px; left: 20px; }
.product-box--noimg { grid-template-columns: 1fr; }
.product-box.has-badge { padding-top: 32px; }
.product-box img { width: 160px; height: 160px; object-fit: contain; border-radius: var(--r-md); background: var(--bg); margin: 0; }
.product-box h4 { margin: 0 0 4px; font-size: 1.25rem; }
.product-box p { font-size: 1rem; margin: 0 0 12px; color: var(--muted); }
.stars { display: inline-flex; gap: 2px; color: #EAB308; margin-bottom: 6px; }
.stars .i { width: 18px; height: 18px; }
.stars .off { color: var(--border-strong); }
@media (max-width: 560px) { .product-box { grid-template-columns: 1fr; text-align: center; } .product-box img { margin-inline: auto; } }

/* Share */
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 32px 0; }
.share-row .label { font-weight: 800; margin-right: 4px; }
.share-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border-radius: var(--r-pill); border: 2px solid var(--border-strong); background: var(--card); color: var(--text); font-weight: 800; font-size: .9375rem; text-decoration: none; transition: transform 150ms var(--ease-spring); }
.share-btn:hover { transform: translateY(-2px) rotate(-2deg); text-decoration: none; }
.share-btn--pinterest { background: #BD081C; border-color: #BD081C; color: #fff; }
.share-btn--whatsapp:hover { border-color: #25D366; }
.share-btn--facebook:hover { border-color: #1877F2; }

/* Author box */
.author-box { position: relative; display: grid; grid-template-columns: 96px 1fr; gap: 20px; margin: 40px 0; padding: 24px; background: var(--kraft) var(--paper); border-radius: var(--r-lg); }
.author-box .tape { left: 60px; }
.author-box img, .author-box .avatar { width: 96px; height: 96px; border-radius: 50%; border: 4px solid var(--card); box-shadow: var(--shadow-sm); }
.author-box .kicker { font-size: .8125rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--kraft-ink); }
.author-box h2 { font-size: 1.5rem; margin: 2px 0 8px; }
.author-box p { margin: 0; font-size: 1rem; color: var(--kraft-ink); }
@media (max-width: 520px) { .author-box { grid-template-columns: 1fr; } }

/* Post nav */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 40px 0; }
.post-nav a { display: grid; gap: 4px; padding: 16px 20px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 800; line-height: 1.35; transition: transform 200ms var(--ease-spring); }
.post-nav a:hover { transform: translateY(-3px); border-color: var(--pet); }
.post-nav small { color: var(--muted); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.post-nav .next { text-align: right; justify-items: end; }
@media (max-width: 600px) { .post-nav { grid-template-columns: 1fr; } }
.entry-tags { margin-top: 24px; }

.related { margin-top: 56px; }
.related h2 { font-size: 1.75rem; }

/* Comments */
.comments-area { margin-top: 56px; max-width: 70ch; }
.comment-list { list-style: none; margin: 0 0 32px; padding: 0; }
.comment-list .children { list-style: none; padding-left: clamp(16px, 4vw, 40px); }
.comment-body { position: relative; margin-bottom: 16px; padding: 18px 20px; border-radius: 20px 20px 20px 6px; background: var(--card); border: 1px solid var(--border); }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.comment-author .avatar { border-radius: 50%; }
.comment-author .says { display: none; }
.comment-metadata { font-size: .8125rem; margin: 2px 0 8px 58px; }
.comment-metadata a { color: var(--muted); text-decoration: none; }
.comment-content { font-size: 1rem; }
.reply a { font-weight: 800; font-size: .875rem; }
.comment-respond { padding: 24px; border-radius: var(--r-lg); background: var(--kraft) var(--paper); }
.comment-form p { margin-bottom: 14px; }
.comment-form label { display: block; font-weight: 800; font-size: .9375rem; margin-bottom: 4px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 2px solid var(--border-strong); border-radius: var(--r-md); background: var(--card); }
.comment-form textarea:focus, .comment-form input:focus { outline: none; border-color: var(--pet); box-shadow: 0 0 0 4px var(--pet-soft); }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; }
.comment-form-cookies-consent label { font-weight: 600; }
.form-submit .submit { min-height: 48px; padding: 12px 24px; border: 0; border-radius: var(--r-pill); background: var(--pet); color: var(--on-pet); font-weight: 800; }
