/*
Theme Name: Fulmemo Tech
Theme URI: https://fulmemo.com/
Author: Fulmemo Technical Desk
Author URI: https://fulmemo.com/about/
Description: A fast, accessible WordPress theme for evidence-led production troubleshooting guides.
Version: 3.3.1
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: fulmemo-tech
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, education, custom-logo, custom-menu, featured-images, accessibility-ready, block-styles
*/

:root {
	--ink: #17202a;
	--muted: #5f6b76;
	--paper: #fffdf8;
	--surface: #ffffff;
	--soft: #f3f0e8;
	--line: #d9d6cc;
	--accent: #246b5f;
	--accent-dark: #174b43;
	--warm: #d9894b;
	--max: 72rem;
	--reading: 46rem;
	--radius: 1rem;
	--shadow: 0 16px 40px rgba(23, 32, 42, .08);
}

* { box-sizing: border-box; }
html { max-width: 100%; overflow-x: hidden; scroll-behavior: smooth; }
body { max-width: 100%; margin: 0; overflow-x: hidden; color: var(--ink); background: var(--paper); font: 17px/1.72 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-dark); text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover, a:focus { color: var(--accent); }
button, input, textarea { font: inherit; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
.screen-reader-text:focus { top: .5rem; left: .5rem; width: auto; height: auto; padding: .75rem 1rem; clip: auto; background: #fff; z-index: 10000; }
.site-shell { width: calc(100% - 2rem); max-width: var(--max); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: rgba(255,253,248,.96); backdrop-filter: blur(12px); }
.header-inner { min-height: 4.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); font-weight: 800; font-size: 1.25rem; text-decoration: none; }
.site-brand svg { width: 2rem; height: 2rem; }
.menu-toggle { display: none; border: 1px solid var(--line); border-radius: .6rem; padding: .55rem .8rem; background: var(--surface); }
.primary-menu ul, .footer-menu ul { display: flex; align-items: center; gap: 1.3rem; margin: 0; padding: 0; list-style: none; }
.primary-menu a { color: var(--ink); font-weight: 650; text-decoration: none; }
.site-main { min-height: 60vh; }
.hero { padding: clamp(4rem, 9vw, 7.5rem) 0 4rem; background: radial-gradient(circle at 85% 15%, #dceee8 0 16%, transparent 17%), linear-gradient(180deg,#fffdf8,#f3f0e8); }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(2rem,5vw,5rem); align-items: center; }
.eyebrow { margin: 0 0 .7rem; color: var(--accent); font-size: .82rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.16; letter-spacing: -.025em; }
h1, h2, h3, .hero-copy { overflow-wrap: anywhere; }
h1 { max-width: 14ch; margin: 0; font-size: clamp(2.65rem,7vw,5.3rem); }
.hero-copy { max-width: 42rem; margin: 1.25rem 0 1.6rem; color: var(--muted); font-size: 1.18rem; }
.button { display: inline-block; border: 0; border-radius: .7rem; padding: .8rem 1.1rem; color: #fff; background: var(--accent-dark); font-weight: 750; text-decoration: none; }
.button:hover, .button:focus { color: #fff; background: var(--accent); }
.button-secondary { margin-left: .5rem; color: var(--accent-dark); background: transparent; border: 1px solid var(--accent); }
.button-secondary:hover, .button-secondary:focus { color: var(--accent-dark); background: #e5f1ed; }
.note-stack { position: relative; min-height: 22rem; }
.note-card { position: absolute; width: min(100%,20rem); min-height: 13rem; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.35rem; background: var(--surface); box-shadow: var(--shadow); }
.note-card:nth-child(1) { top: 0; right: 0; transform: rotate(4deg); }
.note-card:nth-child(2) { top: 4rem; left: 0; transform: rotate(-4deg); background: #fff8dd; }
.note-card:nth-child(3) { top: 9rem; right: 2rem; transform: rotate(1deg); background: #e7f3ef; }
.note-card strong { display: block; margin-bottom: .7rem; }
.note-lines { height: 6rem; background: repeating-linear-gradient(transparent 0 1.35rem, rgba(23,32,42,.14) 1.37rem 1.43rem); }
.section { padding: clamp(3.5rem,7vw,6rem) 0; }
.section-soft { background: var(--soft); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.section-head h2 { max-width: 19ch; margin: 0; font-size: clamp(2rem,4vw,3.2rem); }
.section-head p { max-width: 35rem; margin: 0; color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.2rem; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.35rem; background: var(--surface); box-shadow: 0 8px 20px rgba(23,32,42,.04); }
.card h3 { margin: .35rem 0 .65rem; font-size: 1.3rem; }
.card p { margin: 0 0 1rem; color: var(--muted); }
.card-meta { color: var(--accent); font-size: .82rem; font-weight: 780; text-transform: uppercase; letter-spacing: .08em; }
.post-list { display: grid; gap: 1rem; }
.post-row { display: grid; grid-template-columns: 9rem 1fr; gap: 1.5rem; border-top: 1px solid var(--line); padding: 1.5rem 0; }
.post-row time { color: var(--muted); }
.post-row h2 { margin: 0 0 .45rem; font-size: 1.55rem; }
.post-row p { margin: 0; color: var(--muted); }
.page-header { padding: 4.5rem 0 2rem; border-bottom: 1px solid var(--line); background: var(--soft); }
.page-header h1 { font-size: clamp(2.3rem,5vw,4.2rem); }
.archive-wrap { padding: 3rem 0 5rem; }
.category-nav { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 2rem; }
.category-nav a { border: 1px solid var(--line); border-radius: 999px; padding: .42rem .75rem; background: var(--surface); font-size: .9rem; font-weight: 700; text-decoration: none; }
.article-wrap { width: calc(100% - 2rem); max-width: var(--reading); margin-inline: auto; }
.article-header { padding: 4.5rem 0 2rem; }
.article-header h1 { max-width: 18ch; font-size: clamp(2.5rem,6vw,4.5rem); }
.article-dek { max-width: 42rem; color: var(--muted); font-size: 1.15rem; }
.byline { display: flex; flex-wrap: wrap; gap: .45rem; color: var(--muted); font-size: .94rem; }
.article-body { padding-bottom: 4rem; }
.article-body h2 { margin-top: 2.8rem; font-size: 1.85rem; }
.article-body h3 { margin-top: 2rem; font-size: 1.35rem; }
.article-body p, .article-body li { max-width: 72ch; }
.article-body li + li { margin-top: .45rem; }
.article-body code { border-radius: .25rem; padding: .08rem .32rem; background: #eef1f3; color: #15212b; font: .92em/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.article-body pre { max-width: 100%; overflow-x: auto; border: 1px solid #2d3b45; border-radius: .65rem; padding: 1rem; background: #101820; color: #f2f6f8; }
.article-body pre code { padding: 0; background: transparent; color: inherit; }
.article-body blockquote { margin: 1.5rem 0; border-left: .28rem solid var(--accent); padding: .2rem 1.25rem; background: #f1f7f5; }
.command-example { margin: 2.4rem 0; border: 1px solid #b9d6ce; border-radius: var(--radius); padding: clamp(1rem,3vw,1.5rem); background: #f4faf8; }
.command-example h2 { margin-top: 0; }
.command-example pre { margin: 1rem 0; }
.command-note { margin-bottom: 0; color: #34454f; }
.editorial-note { margin-top: 2.2rem; border-top: 1px solid var(--line); padding-top: 1.1rem; color: var(--muted); font-size: .94rem; }
.toc { margin: 1.5rem 0 2.5rem; border-left: .28rem solid var(--warm); padding: 1rem 1.25rem; background: #fff8e8; }
.toc strong { display: block; margin-bottom: .4rem; }
.toc ol { margin: 0; padding-left: 1.2rem; columns: 2; }
.toc li { break-inside: avoid; }
.callout { margin: 1.7rem 0; border: 1px solid #b9d6ce; border-radius: .8rem; padding: 1.1rem 1.25rem; background: #eef7f4; }
.worked-example { margin: 1.7rem 0; border-left: .25rem solid var(--warm); padding: .2rem 1.25rem; }
.template-preview { margin: 2rem 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; background: #fff; box-shadow: var(--shadow); }
.template-preview h3 { margin-top: 0; }
.template-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: .8rem; }
.template-field { min-height: 4.8rem; border: 1px solid var(--line); border-radius: .55rem; padding: .75rem; background: #fffdf8; }
.template-field strong { display: block; margin-bottom: .3rem; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
.source-list { padding-left: 1.2rem; }
.source-list a { overflow-wrap: anywhere; }
.related { border-top: 1px solid var(--line); padding: 2rem 0 4rem; }
.related ul { display: grid; grid-template-columns: repeat(2,1fr); gap: .7rem 1.5rem; padding-left: 1.2rem; }
.print-sheet { width: 100%; min-width: 0; max-width: 100%; margin: 2rem 0 5rem; border: 1px solid var(--line); padding: clamp(1.25rem,4vw,3rem); overflow-x: auto; background: #fff; box-shadow: var(--shadow); }
.print-sheet header { border-bottom: 2px solid var(--ink); margin-bottom: 1.5rem; padding-bottom: 1rem; }
.print-sheet table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.print-sheet th, .print-sheet td { border: 1px solid var(--line); padding: .75rem; overflow-wrap: anywhere; text-align: left; vertical-align: top; }
.blank-lines { min-height: 7rem; background: repeating-linear-gradient(transparent 0 1.55rem, var(--line) 1.57rem 1.62rem); }
.site-footer { border-top: 1px solid var(--line); padding: 3rem 0; background: #17202a; color: #dfe4e7; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: start; }
.site-footer a { color: #fff; }
.footer-tagline { max-width: 35rem; color: #bfc8ce; }
.footer-menu ul { flex-wrap: wrap; justify-content: end; }
.copyright { margin-top: 2rem; color: #9faab1; font-size: .88rem; }
.pagination { display: flex; gap: 1rem; margin-top: 2rem; }

@media (max-width: 800px) {
	.hero-grid, .card-grid { grid-template-columns: 1fr; }
	.hero-grid > *, .card-grid > *, .section-head > * { min-width: 0; }
	.note-stack { display: grid; width: 100%; max-width: 28rem; min-height: auto; gap: .8rem; margin: 1rem auto 0; }
	.note-card, .note-card:nth-child(1), .note-card:nth-child(2), .note-card:nth-child(3) { position: relative; inset: auto; width: 100%; min-height: 8rem; transform: none; }
	.note-lines { height: 3.6rem; }
	.menu-toggle { display: inline-block; }
	.primary-menu { display: none; position: absolute; top: 4.5rem; left: 0; right: 0; border-bottom: 1px solid var(--line); padding: 1rem; background: var(--paper); }
	.primary-menu.is-open { display: block; }
	.primary-menu ul { display: grid; gap: .7rem; }
	.section-head, .footer-grid { display: block; }
	.section-head p { margin-top: 1rem; }
	.footer-menu ul { justify-content: start; margin-top: 1.5rem; }
	.toc ol { columns: 1; }
}

@media (max-width: 540px) {
	.post-row { grid-template-columns: 1fr; gap: .25rem; }
	.template-grid, .related ul { grid-template-columns: 1fr; }
	.hero-actions .button { display: block; width: 100%; text-align: center; }
	.button-secondary { margin: .65rem 0 0; }
	.print-sheet { padding: 1.1rem; }
	.print-sheet th, .print-sheet td { padding: .45rem; font-size: .88rem; }
}

@media print {
	.site-header, .site-footer, .page-header, .print-actions, .breadcrumbs { display: none !important; }
	body { background: #fff; color: #000; font-size: 11pt; }
	.site-shell, .article-wrap { width: 100%; max-width: none; }
	.print-sheet { margin: 0; border: 0; box-shadow: none; padding: 0; }
	a { color: #000; text-decoration: none; }
}
