/*
Theme Name: Wisundi
Theme URI: https://wisundi.com
Author: wisundi
Description: Fast, builder-free theme for wisundi.com — maker blog, build guides with table of contents, project hubs and a WooCommerce kit shop. System fonts only, no jQuery outside the shop, one stylesheet.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: wisundi
*/

/* ---------- Tokens ---------- */
:root {
	--mat: #1f5c4a;          /* cutting-mat green */
	--mat-deep: #143d31;
	--paper: #f6f8f6;
	--white: #fff;
	--ink: #17201c;
	--muted: #56645e;
	--line: #d8e0db;
	--line-strong: #b9c6bf;
	--link: #0b6684;
	--oled: #22d3ee;         /* the robot's eyes */
	--solder: #f2c230;
	--tip-bg: #fff7d9;
	--warn: #a52a1f;
	--warn-bg: #fdecea;
	--ok: #1f7a4d;

	--font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--font-head: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-code: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

	--wrap: 1200px;
	--measure: 70ch;
	--gutter: clamp(16px, 4vw, 32px);
	--r-tile: 10px;
	--r-btn: 8px;
	--r-tag: 4px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 400 17px/1.65 var(--font-ui);
	text-rendering: optimizeLegibility;
}
img, video, svg, iframe { max-width: 100%; height: auto; }
img { vertical-align: middle; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { color: var(--mat); }
:focus-visible { outline: 3px solid var(--oled); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; letter-spacing: -.01em; margin: 1.6em 0 .55em; font-weight: 750; }
h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); margin-top: 0; letter-spacing: -.02em; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p, ul, ol, dl, table, figure, blockquote, pre { margin: 0 0 1.15em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
code, kbd, pre { font-family: var(--font-code); font-size: .9em; }
:not(pre) > code { background: #e8eeea; padding: .1em .35em; border-radius: var(--r-tag); }
pre { background: var(--mat-deep); color: #e7f3ee; padding: 1em 1.2em; border-radius: var(--r-tile); overflow-x: auto; line-height: 1.5; }
blockquote { border-left: 4px solid var(--mat); padding: .2em 0 .2em 1.1em; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .6em .75em; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 650; background: #edf2ef; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 999; width: auto; height: auto; clip: auto; background: var(--white); padding: .6em 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: calc(900px + 2 * var(--gutter)); }
.alignwide { max-width: 1000px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { font-size: .88rem; color: var(--muted); margin-top: .5em; }

/* ---------- Buttons ---------- */
.btn, .button, button.button, input[type="submit"], .wp-block-button__link {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	font: 650 1rem/1.2 var(--font-ui);
	padding: .8em 1.3em; border-radius: var(--r-btn);
	border: 2px solid var(--mat); background: var(--mat); color: var(--white);
	text-decoration: none; cursor: pointer;
}
.btn:hover, .button:hover, input[type="submit"]:hover { background: var(--mat-deep); border-color: var(--mat-deep); color: var(--white); }
.btn--ghost { background: transparent; color: var(--mat); }
.btn--ghost:hover { background: var(--mat); color: var(--white); }
.btn--light { background: var(--white); border-color: var(--white); color: var(--mat-deep); }
.btn--light:hover { background: var(--oled); border-color: var(--oled); color: var(--mat-deep); }
.btn--outline-light { background: transparent; border-color: rgba(255,255,255,.7); color: var(--white); }
.btn--outline-light:hover { background: rgba(255,255,255,.12); border-color: var(--white); color: var(--white); }

input[type="text"], input[type="email"], input[type="search"], input[type="tel"], input[type="url"], input[type="number"], input[type="password"], select, textarea {
	font: inherit; color: inherit; width: 100%;
	padding: .65em .8em; border: 1px solid var(--line-strong); border-radius: var(--r-btn); background: var(--white);
}

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(246,248,246,.94); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(8px)) { .site-header { background: rgba(246,248,246,.82); backdrop-filter: blur(8px); } }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font: 800 1.35rem/1 var(--font-head); color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.brand:hover { color: var(--mat); }
.brand__mark { width: 30px; height: 30px; flex: none; }
.brand img { max-height: 40px; width: auto; }
.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.nav a { display: block; padding: .5em .8em; color: var(--ink); text-decoration: none; font-weight: 550; border-radius: var(--r-btn); }
.nav a:hover, .nav .current-menu-item > a, .nav .current_page_parent > a, .nav .current-menu-ancestor > a { background: #e5ece8; color: var(--mat-deep); }
.header-tools { display: flex; align-items: center; gap: .25rem; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: var(--r-btn); color: var(--ink); background: none; border: 0; cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: #e5ece8; color: var(--mat-deep); }
.icon-btn svg { width: 22px; height: 22px; }
.cart-count { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--mat); color: #fff; font: 700 11px/18px var(--font-ui); text-align: center; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
	.nav-toggle { display: inline-grid; }
	.nav { position: absolute; top: 100%; left: 0; right: 0; margin: 0; background: var(--paper); border-bottom: 1px solid var(--line); display: none; }
	.nav.is-open { display: block; }
	.no-js .nav { position: static; display: block; width: 100%; order: 5; }
	.nav ul { flex-direction: column; padding: .5rem var(--gutter) 1rem; }
	.nav a { padding: .8em .6em; }
	.site-header .wrap { flex-wrap: wrap; }
	.header-tools { margin-left: auto; }
}

/* ---------- Hero (cutting mat) ---------- */
.mat {
	position: relative; color: #eaf4ef; background-color: var(--mat);
	background-image:
		linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px),
		linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px);
	background-size: 20px 20px, 20px 20px, 100px 100px, 100px 100px;
	background-position: -1px -1px;
}
.mat::after { /* ruler along the bottom edge */
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 14px;
	background-image:
		repeating-linear-gradient(90deg, rgba(255,255,255,.75) 0 1px, transparent 1px 100px),
		repeating-linear-gradient(90deg, rgba(255,255,255,.45) 0 1px, transparent 1px 20px);
	background-size: 100% 14px, 100% 7px;
	background-position: 0 100%, 0 100%;
	background-repeat: no-repeat;
}
.mat a:not(.btn) { color: var(--white); }
.hero { padding: clamp(56px, 9vw, 112px) 0 clamp(64px, 9vw, 120px); }
.hero__inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.hero h1 { color: var(--white); font-size: clamp(2.3rem, 5.4vw, 4rem); line-height: 1.04; letter-spacing: -.03em; max-width: 14ch; margin-bottom: .45em; }
.hero p.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 46ch; color: #d5e8df; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }
.hero__art { justify-self: center; width: min(100%, 360px); }
.hero__art img { border-radius: var(--r-tile); box-shadow: 0 30px 60px -20px rgba(0,0,0,.45); }
@media (max-width: 860px) { .hero__inner { grid-template-columns: 1fr; } .hero__art { display: none; } }

/* OLED eyes illustration (pure SVG, no image request) */
.oled { width: 100%; height: auto; display: block; }

/* ---------- Page header (inner pages) ---------- */
.page-head { padding: clamp(36px, 6vw, 64px) 0 clamp(40px, 6vw, 64px); }
.page-head h1 { color: var(--white); margin-bottom: .3em; }
.page-head p { color: #d5e8df; max-width: 60ch; margin: 0; font-size: 1.1rem; }
.page-head--plain { background: none; color: inherit; padding-bottom: 1rem; }
.page-head--plain h1 { color: var(--ink); }
.page-head--plain p { color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section + .section { padding-top: 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.section__head h2 { margin: 0; }
.section__head p { margin: .3em 0 0; color: var(--muted); }
.section__more { font-weight: 600; }

/* ---------- Grids & tiles ---------- */
.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.tile { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-tile); overflow: hidden; color: inherit; text-decoration: none; }
.tile:hover { border-color: var(--mat); color: inherit; }
.tile__img { aspect-ratio: 16/10; background: #e3ebe6; overflow: hidden; }
.tile__img img { width: 100%; height: 100%; object-fit: cover; }
.tile__img--empty { display: grid; place-items: center; color: var(--muted); }
.tile__body { padding: 1rem 1.15rem 1.2rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.tile__title { font: 700 1.12rem/1.3 var(--font-head); margin: 0; color: var(--ink); }
.tile__text { color: var(--muted); font-size: .95rem; margin: 0; }
.tile__meta { margin-top: auto; padding-top: .5rem; font-size: .88rem; color: var(--muted); display: flex; gap: .9rem; flex-wrap: wrap; align-items: center; }
.tile__price { font-weight: 700; color: var(--ink); font-size: 1rem; }
.tile__price del { color: var(--muted); font-weight: 400; margin-right: .3em; }
.tile__price ins { text-decoration: none; }

.tag { display: inline-block; font-size: .78rem; font-weight: 650; padding: .2em .55em; border-radius: var(--r-tag); background: #e5ece8; color: var(--mat-deep); }
.tag--beginner { background: #dff3e8; color: #135a36; }
.tag--intermediate { background: #fff1c7; color: #6b4d00; }
.tag--advanced { background: #fde3dd; color: #8a2414; }

/* Steps (real sequence) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: step; }
.steps li { counter-increment: step; padding-top: 3.2rem; position: relative; }
.steps li::before { content: counter(step); position: absolute; top: 0; left: 0; width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; background: var(--mat); color: var(--white); font: 750 1.05rem/1 var(--font-head); }
.steps h3 { margin: 0 0 .35em; }
.steps p { margin: 0; color: var(--muted); }

/* ---------- Layout with sidebar ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(28px, 4vw, 56px); padding-top: clamp(28px, 4vw, 48px); padding-bottom: clamp(48px, 7vw, 88px); align-items: start; }
.layout--full { grid-template-columns: minmax(0, 1fr); }
.sidebar { position: sticky; top: 84px; display: grid; gap: 1.25rem; max-height: calc(100vh - 100px); overflow-y: auto; overscroll-behavior: contain; padding-bottom: 1rem; }
.widget { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-tile); padding: 1rem 1.15rem; font-size: .95rem; }
.widget-title, .widget h2 { font-size: 1rem; margin: 0 0 .6em; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: .3em 0; }
@media (max-width: 980px) {
	.layout { grid-template-columns: minmax(0, 1fr); }
	.sidebar { position: static; max-height: none; overflow: visible; }
	.sidebar .toc { display: none; } /* mobile TOC sits above the article */
}

/* ---------- Article ---------- */
.article-head { margin-bottom: 1.6rem; }
.article-head .cats { margin-bottom: .8rem; display: flex; gap: .4rem; flex-wrap: wrap; }
.article-meta { color: var(--muted); font-size: .92rem; display: flex; flex-wrap: wrap; gap: 1rem; }
.article-thumb { margin: 0 0 1.8rem; border-radius: var(--r-tile); overflow: hidden; }
.entry { max-width: var(--measure); font-size: 1.06rem; }
.entry > *:first-child { margin-top: 0; }
.entry h2, .entry h3 { scroll-margin-top: 88px; }
.entry img { border-radius: 6px; }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry li { margin-bottom: .35em; }
.entry .wp-block-image { margin-bottom: 1.4em; }
.entry table { display: block; overflow-x: auto; }
.page-links { margin-top: 2rem; font-weight: 600; }

/* Reading progress */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--oled); z-index: 60; }

/* ---------- Table of contents ---------- */
.toc { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-tile); padding: 1rem 1.15rem; font-size: .93rem; }
.toc__title { font: 700 1rem/1.3 var(--font-head); margin: 0 0 .5rem; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; }
.toc a { display: block; padding: .32em .6em; margin-left: -.6em; color: var(--muted); text-decoration: none; border-left: 2px solid transparent; border-radius: 0 4px 4px 0; line-height: 1.4; }
.toc a:hover { color: var(--mat-deep); background: #eef3f0; }
.toc a.is-active { color: var(--mat-deep); border-left-color: var(--oled); background: #eaf7fa; font-weight: 600; }
.toc .toc__sub a { padding-left: 1.5em; font-size: .9rem; }
.toc-mobile { display: none; margin-bottom: 1.6rem; }
.toc-mobile summary { cursor: pointer; font: 700 1rem/1.3 var(--font-head); list-style: none; display: flex; justify-content: space-between; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary::after { content: "+"; font-weight: 400; }
.toc-mobile[open] summary::after { content: "−"; }
.toc-mobile[open] summary { margin-bottom: .5rem; }
@media (max-width: 980px) { .toc-mobile { display: block; } }

/* ---------- Tutorial building blocks (wisundi-core) ---------- */
.wsd-step { position: relative; margin: 2.4rem 0 1.5rem 1.2rem; padding: 0 0 .5rem 2.2rem; border-left: 2px dashed var(--line-strong); }
.wsd-step__title { margin-top: 0 !important; padding-top: .15rem; }
.wsd-step__num { position: absolute; left: -1.3rem; top: -.1rem; width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--mat); color: #fff; font: 750 1.05rem/1 var(--font-head); box-shadow: 0 0 0 4px var(--paper); }
.wsd-note { border-radius: var(--r-tile); padding: .9rem 1.1rem .9rem 1.1rem; margin: 1.4em 0; border: 1px solid; font-size: .98rem; }
.wsd-note > :last-child { margin-bottom: 0; }
.wsd-note__label { font-weight: 750; display: block; margin-bottom: .2em; }
.wsd-note--tip { background: var(--tip-bg); border-color: #f0d77d; }
.wsd-note--warning { background: var(--warn-bg); border-color: #f2b8b0; }
.wsd-note--warning .wsd-note__label { color: var(--warn); }

/* Lite YouTube */
.wsd-yt { position: relative; aspect-ratio: 16/9; background: #000; border-radius: var(--r-tile); overflow: hidden; margin: 0 0 1.6rem; }
.wsd-yt iframe, .wsd-yt__btn { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.wsd-yt__btn { padding: 0; background: #000; cursor: pointer; display: block; }
.wsd-yt__btn img { width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.wsd-yt__btn:hover img { opacity: 1; }
.wsd-yt__play { position: absolute; left: 50%; top: 50%; width: 72px; height: 50px; margin: -25px 0 0 -36px; border-radius: 12px; background: rgba(23,32,28,.85); }
.wsd-yt__play::after { content: ""; position: absolute; left: 29px; top: 15px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.wsd-yt__btn:hover .wsd-yt__play { background: #e00; }
.wsd-yt__title { position: absolute; left: 0; right: 0; top: 0; padding: .8rem 1rem 2rem; color: #fff; font-weight: 600; text-align: left; background: linear-gradient(rgba(0,0,0,.6), transparent); font-size: .98rem; }

/* Buy card */
.wsd-buy { display: grid; grid-template-columns: 120px 1fr auto; gap: 1rem 1.25rem; align-items: center; background: var(--white); border: 2px solid var(--mat); border-radius: var(--r-tile); padding: 1rem; margin: 1.8rem 0; max-width: var(--measure); }
.wsd-buy__img { border-radius: 6px; overflow: hidden; aspect-ratio: 1; background: #e3ebe6; }
.wsd-buy__img img { width: 100%; height: 100%; object-fit: cover; }
.wsd-buy__name { font: 700 1.1rem/1.3 var(--font-head); margin: 0 0 .25rem; }
.wsd-buy__text { margin: 0; color: var(--muted); font-size: .93rem; }
.wsd-buy__price { font-weight: 700; margin-top: .3rem; }
@media (max-width: 600px) { .wsd-buy { grid-template-columns: 84px 1fr; } .wsd-buy .btn { grid-column: 1 / -1; } }

/* BOM / specs tables */
.wsd-bom td:first-child, .wsd-bom th:first-child { width: 4.5em; text-align: center; font-weight: 700; }
.wsd-list { padding-left: 1.2em; }
.wsd-list--check { list-style: none; padding: 0; }
.wsd-list--check li { padding-left: 1.6em; position: relative; margin-bottom: .4em; }
.wsd-list--check li::before { content: ""; position: absolute; left: .2em; top: .45em; width: .45em; height: .8em; border: solid var(--ok); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.wsd-list--cross li::before { border: 0; content: "✕"; transform: none; top: 0; left: .1em; color: var(--warn); width: auto; height: auto; font-size: .9em; }
.wsd-specs th { width: 40%; background: none; color: var(--muted); font-weight: 550; }
.wsd-downloads { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.wsd-downloads a { display: flex; align-items: center; gap: .7rem; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: var(--r-btn); background: var(--white); text-decoration: none; color: var(--ink); font-weight: 600; }
.wsd-downloads a:hover { border-color: var(--mat); }
.wsd-downloads svg { width: 20px; height: 20px; color: var(--mat); flex: none; }
.wsd-downloads small { margin-left: auto; color: var(--muted); font-weight: 400; }

/* Kit facts (product summary) */
.wsd-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .5rem; margin: 1rem 0 1.25rem; padding: 0; list-style: none; }
.wsd-facts li { background: #eef3f0; border-radius: var(--r-btn); padding: .55rem .75rem; font-size: .9rem; line-height: 1.35; }
.wsd-facts span { display: block; color: var(--muted); font-size: .8rem; }
.wsd-facts strong { font-weight: 700; }
.wsd-learn-link { display: flex; gap: .6rem; align-items: center; padding: .75rem 1rem; border-radius: var(--r-btn); background: #eaf7fa; border: 1px solid #b7e6f0; margin: 0 0 1.25rem; font-size: .95rem; }
.wsd-learn-link svg { width: 20px; height: 20px; flex: none; color: var(--link); }

/* FAQ */
.faq details { border: 1px solid var(--line); background: var(--white); border-radius: var(--r-btn); margin-bottom: .6rem; }
.faq summary { cursor: pointer; padding: .9rem 1.1rem; font-weight: 650; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq details > div { padding: .9rem 1.1rem; }
.faq details > div > :last-child { margin-bottom: 0; }

/* ---------- Project hub ---------- */
.project-hero { padding: clamp(40px, 6vw, 72px) 0 clamp(48px, 7vw, 84px); }
.project-hero__inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.project-hero h1 { color: var(--white); }
.project-hero p { color: #d5e8df; font-size: 1.12rem; }
.project-hero .tags { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.project-hero .wsd-yt, .project-hero__img { margin: 0; box-shadow: 0 30px 60px -24px rgba(0,0,0,.5); border-radius: var(--r-tile); overflow: hidden; }
@media (max-width: 860px) { .project-hero__inner { grid-template-columns: 1fr; } }
.project-nav { position: sticky; top: 64px; z-index: 40; background: var(--white); border-bottom: 1px solid var(--line); }
.project-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; }
.project-nav a { display: block; padding: .85em .9em; white-space: nowrap; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
.project-nav a:hover { color: var(--mat-deep); }
.versions { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.version { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-tile); padding: 1.2rem; display: flex; flex-direction: column; gap: .5rem; }
.version h3 { margin: 0; font-size: 1.15rem; }
.version p { margin: 0; color: var(--muted); font-size: .95rem; }
.version .btn { margin-top: auto; }
.version__price { font-weight: 750; font-size: 1.2rem; }

/* ---------- Pagination / misc ---------- */
.pagination, .nav-links { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: 2.5rem; }
.page-numbers { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 .7em; border: 1px solid var(--line); border-radius: var(--r-btn); background: var(--white); text-decoration: none; color: var(--ink); font-weight: 600; }
.page-numbers.current { background: var(--mat); border-color: var(--mat); color: #fff; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3rem; max-width: var(--measure); }
.post-nav a { display: block; padding: 1rem; border: 1px solid var(--line); border-radius: var(--r-tile); background: var(--white); text-decoration: none; color: var(--ink); font-weight: 650; }
.post-nav small { display: block; color: var(--muted); font-weight: 400; }
.post-nav .next { text-align: right; }
.empty { padding: 2.5rem; border: 2px dashed var(--line-strong); border-radius: var(--r-tile); text-align: center; color: var(--muted); }
.search-form { display: flex; gap: .5rem; max-width: 520px; }
.search-form label { flex: 1; }
.related { margin-top: 3.5rem; }

/* ---------- Comments ---------- */
.comments { max-width: var(--measure); margin-top: 3.5rem; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 1.5rem; border-left: 2px solid var(--line); }
.comment-body { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.comment-meta { font-size: .9rem; color: var(--muted); }
.comment-author .avatar { border-radius: 50%; margin-right: .5rem; }
.comment-form p { margin-bottom: .9rem; }
.comment-form label { display: block; font-weight: 600; margin-bottom: .3rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--mat-deep); color: #c9dcd3; padding: 48px 0 32px; margin-top: 0; font-size: .95rem; }
.site-footer a { color: #e8f3ee; text-decoration: none; }
.site-footer a:hover { color: var(--oled); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer-grid h2 { color: #fff; font-size: 1rem; margin: 0 0 .7rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: .45rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 2rem; padding-top: 1.25rem; font-size: .85rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print { .site-header, .site-footer, .sidebar, .progress, .project-nav, .wsd-buy { display: none !important; } .layout { display: block; } body { background: #fff; } }
