/*
Theme Name: Swift Foods
Theme URI: https://swiftfoods.com.ph/
Author: Swift Foods, Inc.
Description: A modernized replacement for the site's customized Twenty Thirteen theme. Keeps every existing page, post, menu, widget and document list; only the presentation changes. Includes a PHP 8.4-safe replacement for the BSK Files Manager document lists, with filtering for long lists.
Version: 2.0.0
Requires at least: 7.1
Tested up to: 7.1
Requires PHP: 8.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: swiftfoods
Tags: one-column, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, translation-ready, accessibility-ready
*/

/* ---------- Tokens ---------- */
:root {
	--red: #D50708;
	--red-dark: #A30406;
	--ink: #1D2129;
	--text: #2B303A;
	--muted: #5E6674;
	--line: #DCE0E5;
	--surface: #F3F5F7;
	--paper: #FFFFFF;

	--font-head: "Bitter", Georgia, "Times New Roman", serif;
	--font-body: "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, -apple-system, sans-serif;

	--step--1: .9rem;
	--step-0: 1.0625rem;
	--step-1: 1.25rem;
	--step-2: clamp(1.4rem, 1.2rem + .8vw, 1.75rem);
	--step-3: clamp(1.9rem, 1.5rem + 1.8vw, 2.75rem);
	--step-4: clamp(2.3rem, 1.6rem + 3vw, 3.75rem);

	--wrap: 1200px;
	--gutter: clamp(1.25rem, 4vw, 2.5rem);
	--radius: 6px;
	--header-h: 84px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--font-body);
	font-size: var(--step-0);
	line-height: 1.65;
	color: var(--text);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img, svg, video, iframe, embed, object { max-width: 100%; }
img, video { height: auto; }
a { color: var(--red-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); text-decoration-thickness: 2px; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); font-weight: 600; color: var(--ink); line-height: 1.2; margin: 0 0 .6em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.site-main:focus { outline: none; }
::selection { background: #FBD5D5; color: var(--ink); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 1000; background: var(--ink); color: #fff; padding: .7rem 1rem; border-radius: var(--radius); }
.skip-link:focus { top: 1rem; color: #fff; }
.icon { flex-shrink: 0; }

.btn {
	display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .6rem 1.2rem;
	font: 600 1rem/1 var(--font-body); color: #fff; background: var(--red); border: 0; border-radius: var(--radius);
	text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--red-dark); color: #fff; }
.text-link { font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.text-link:hover { color: var(--red); }
.icon-btn {
	display: inline-grid; place-items: center; width: 44px; height: 44px;
	border: 0; border-radius: var(--radius); background: transparent; color: var(--ink); cursor: pointer;
}
.icon-btn:hover { background: var(--surface); }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 100; background: #fff;
	border-bottom: 3px solid var(--red);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.site-header.is-scrolled { box-shadow: 0 8px 24px -20px rgba(29,33,41,.6); }
.header-inner {
	display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "brand . actions" "nav nav nav";
	align-items: center; column-gap: 2rem; padding-top: 1rem;
}
.brand { grid-area: brand; }
.header-actions { grid-area: actions; }
.primary-nav { grid-area: nav; }
.brand { flex-shrink: 0; }
.brand img, .brand .custom-logo { display: block; width: auto; height: 56px; }
.brand-link, .custom-logo-link { display: block; }

.primary-nav { display: flex; align-items: center; margin-top: .5rem; margin-left: -.7rem; }
.primary-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.primary-nav .menu li { position: relative; }
.primary-nav .menu > li > a {
	display: flex; align-items: center; min-height: 52px; padding: 0 .7rem;
	font-weight: 600; color: var(--ink); text-decoration: none; position: relative; white-space: nowrap;
}
.primary-nav .menu > li > a::after {
	content: ""; position: absolute; left: .7rem; right: .7rem; bottom: -3px; height: 3px;
	background: var(--ink); transform: scaleX(0); transition: transform .15s;
}
.primary-nav .menu > li > a:hover::after,
.primary-nav .menu > li:focus-within > a::after { transform: scaleX(1); }
.primary-nav .menu > .current-menu-item > a,
.primary-nav .menu > .current-menu-ancestor > a,
.primary-nav .menu > .current_page_item > a,
.primary-nav .menu > .current_page_ancestor > a { color: var(--red-dark); }
.primary-nav .menu > .current-menu-item > a::after,
.primary-nav .menu > .current-menu-ancestor > a::after,
.primary-nav .menu > .current_page_item > a::after,
.primary-nav .menu > .current_page_ancestor > a::after { background: var(--red); transform: scaleX(1); }

.submenu-toggle {
	display: none; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 .25rem; margin-left: -.6rem;
}
.submenu-toggle .icon { width: 16px; height: 16px; transition: transform .15s; }
.primary-nav .sub-menu, .primary-nav .children {
	list-style: none; margin: 0; padding: .5rem 0; position: absolute; left: 0; top: 100%; z-index: 10;
	min-width: 260px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--red);
	box-shadow: 0 18px 40px -18px rgba(29,33,41,.35);
	opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .12s, transform .12s, visibility .12s;
}
.primary-nav .sub-menu .sub-menu, .primary-nav .children .children { left: 100%; top: -.5rem; border-top-width: 1px; }
.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu, .primary-nav li.is-open > .sub-menu, .primary-nav li.is-open > .children,
.primary-nav li:hover > .children, .primary-nav li:focus-within > .children { opacity: 1; visibility: visible; transform: none; }
.primary-nav .sub-menu a, .primary-nav .children a { display: block; padding: .55rem 1.1rem; color: var(--text); text-decoration: none; line-height: 1.35; }
.primary-nav .sub-menu a:hover, .primary-nav .children a:hover { background: var(--surface); color: var(--red-dark); }
.primary-nav .sub-menu .current-menu-item > a { color: var(--red-dark); font-weight: 600; }
.primary-nav .menu > .menu-item-has-children > a, .primary-nav .menu > .page_item_has_children > a { padding-right: 1.75rem; }
.primary-nav .menu > .menu-item-has-children > a::after, .primary-nav .menu > .page_item_has_children > a::after { right: 1.75rem; }
.primary-nav .menu > .menu-item-has-children > a::before, .primary-nav .menu > .page_item_has_children > a::before {
	content: ""; position: absolute; right: .75rem; top: 50%; width: 6px; height: 6px; margin-top: -5px;
	border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
}

.nav-search { display: none; }
.header-actions { display: flex; align-items: center; gap: .25rem; }
.search-toggle { width: auto; padding: 0 .9rem; gap: .5rem; display: inline-flex; align-items: center; border: 1px solid var(--line); font: 600 .95rem var(--font-body); }
.nav-toggle, .nav-toggle-close { display: none; }

.search-panel { border-top: 1px solid var(--line); background: var(--surface); }
.search-panel-inner { display: flex; align-items: center; gap: .75rem; padding-block: 1rem; }
.search-form { flex: 1; display: flex; align-items: center; gap: .5rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .25rem .25rem .25rem .9rem; }
.search-form:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(29,33,41,.12); }
.search-form .icon { color: var(--muted); }
.search-field { flex: 1; min-width: 0; border: 0; padding: .55rem .25rem; font: inherit; color: var(--ink); background: transparent; }
.search-field:focus { outline: none; }
.search-submit { min-height: 40px; padding: 0 1rem; border: 0; border-radius: 4px; background: var(--ink); color: #fff; font: 600 .95rem var(--font-body); cursor: pointer; }
.search-submit:hover { background: var(--red); }

@media (max-width: 960px) {
	:root { --header-h: 72px; }
	.header-inner { display: flex; min-height: var(--header-h); padding-top: 0; }
	.brand img, .brand .custom-logo { height: 44px; }
	.nav-toggle { display: inline-grid; }
	.search-toggle { display: none; }
	.header-actions { margin-left: auto; }
	.primary-nav {
		position: fixed; inset: var(--header-h) 0 0 0; z-index: 99;
		flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 1.25rem; margin: 0;
		padding: 1rem var(--gutter) 2rem; background: #fff; overflow-y: auto;
		visibility: hidden; opacity: 0; transition: opacity .15s, visibility .15s;
	}
	.admin-bar .primary-nav { top: calc(var(--header-h) + 46px); }
	.nav-open .primary-nav { visibility: visible; opacity: 1; }
	.nav-open { overflow: hidden; }
	.nav-open .nav-toggle-open { display: none; }
	.nav-open .nav-toggle-close { display: block; }
	.nav-search { display: block; order: -1; }
	.primary-nav .menu { flex-direction: column; flex-wrap: nowrap; }
	.primary-nav .menu li { display: flex; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--line); }
	.primary-nav .menu li li { border-bottom: 0; }
	.primary-nav .menu > li > a { flex: 1; min-height: 54px; padding: 0; font-family: var(--font-head); font-size: 1.2rem; }
	.primary-nav .menu > li > a::after, .primary-nav .menu > .menu-item-has-children > a::before, .primary-nav .menu > .page_item_has_children > a::before { display: none; }
	.primary-nav .menu > .menu-item-has-children > a, .primary-nav .menu > .page_item_has_children > a { padding-right: 0; }
	.submenu-toggle { display: inline-grid; place-items: center; width: 44px; height: 44px; margin: 0; }
	.is-open > .submenu-toggle .icon { transform: rotate(180deg); }
	.primary-nav .sub-menu, .primary-nav .children, .primary-nav .sub-menu .sub-menu {
		position: static; flex-basis: 100%; min-width: 0; padding: 0 0 .75rem 1rem;
		border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; display: none;
	}
	.primary-nav li.is-open > .sub-menu, .primary-nav li.is-open > .children { display: block; }
	.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu { display: none; }
	.primary-nav li.is-open:hover > .sub-menu, .primary-nav li.is-open:focus-within > .sub-menu { display: block; }
	.primary-nav .sub-menu a, .primary-nav .children a { padding: .5rem 0; }
	.primary-nav .sub-menu li { border: 0; }
	.primary-nav .sub-menu a:hover { background: none; }
}

/* ---------- Page head ---------- */
.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding-block: clamp(1.75rem, 4vw, 3rem); }
.page-title { font-size: var(--step-3); font-weight: 700; margin: 0; max-width: 28ch; text-wrap: balance; }
.page-meta { margin: 0 0 .4rem; color: var(--muted); font-weight: 600; }
.page-intro { margin-top: .75rem; color: var(--muted); font-size: var(--step-1); max-width: 60ch; }
.page-intro > :last-child { margin-bottom: 0; }

.crumbs ol { list-style: none; margin: 0 0 .75rem; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; font-size: var(--step--1); }
.crumbs li { display: inline-flex; align-items: center; gap: .25rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; color: #A3AAB5; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--red-dark); text-decoration: underline; }

/* ---------- Layout ---------- */
.layout { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5rem); }
.layout.has-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.layout > .entry-content, .layout > .listing { min-width: 0; max-width: 820px; }
@media (max-width: 960px) { .layout.has-sidebar { grid-template-columns: 1fr; } }

/* ---------- Sidebar & widgets ---------- */
.page-sidebar { display: grid; gap: 2rem; position: sticky; top: calc(var(--header-h) + 24px); }
@media (max-width: 960px) { .page-sidebar { position: static; border-top: 1px solid var(--line); padding-top: 2rem; } }
.widget-title { font: 700 .95rem/1.3 var(--font-body); color: var(--ink); margin: 0 0 .75rem; padding-bottom: .6rem; border-bottom: 2px solid var(--ink); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: .5rem 0; border-bottom: 1px solid var(--line); line-height: 1.4; }
.widget li:last-child { border-bottom: 0; }
.widget a { color: var(--text); text-decoration: none; }
.widget a:hover { color: var(--red-dark); text-decoration: underline; }
.widget .post-date { display: block; font-size: var(--step--1); color: var(--muted); }
.widget select { width: 100%; padding: .5rem; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; }
.widget .search-form { margin: 0; }

.section-nav ul { list-style: none; margin: 0; padding: 0; }
.section-nav a {
	display: block; padding: .5rem .75rem; margin-left: -.75rem; border-left: 3px solid transparent;
	color: var(--text); text-decoration: none; line-height: 1.35;
}
.section-nav a:hover { background: var(--surface); color: var(--ink); }
.section-nav a[aria-current="page"] { border-left-color: var(--red); background: var(--surface); color: var(--ink); font-weight: 700; }
.section-nav .depth-2 a { padding-left: 1.6rem; font-size: .97rem; }
.section-nav .depth-3 a { padding-left: 2.4rem; font-size: .95rem; }

/* ---------- Entry content (existing page/post content) ---------- */
.entry-content > :first-child { margin-top: 0; }
.entry-content h2 { font-size: var(--step-2); margin-top: 2em; }
.entry-content h3 { font-size: var(--step-1); margin-top: 1.75em; }
.entry-content h4, .entry-content h5, .entry-content h6 { font-size: 1.05rem; margin-top: 1.5em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 0 0 1.25em; }
.entry-content li { margin-bottom: .35em; }
.entry-content li::marker { color: var(--red); }
.entry-content img { border-radius: var(--radius); }
.entry-content blockquote { margin: 1.5em 0; padding: .25em 0 .25em 1.25rem; border-left: 3px solid var(--red); color: var(--ink); font-size: var(--step-1); }
.entry-content hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .97rem; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { padding: .65rem .8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry-content thead th, .entry-content tr:first-child th { background: var(--surface); color: var(--ink); font-weight: 700; border-bottom: 2px solid var(--ink); }
.entry-content tbody tr:hover td { background: #FAFBFC; }
.entry-content iframe, .entry-content .wp-video, .entry-content video { width: 100% !important; border-radius: var(--radius); }
.entry-content .wp-video { margin-bottom: 1.5em; }
.entry-content .wp-caption, .entry-content figure { margin: 1.5em 0; max-width: 100%; }
.entry-content .wp-caption-text, .entry-content figcaption { font-size: var(--step--1); color: var(--muted); margin-top: .5rem; }
.entry-feature { margin: 0 0 2rem; }
.entry-feature img { width: 100%; }
.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
.entry-content::after { content: ""; display: table; clear: both; }
@media (max-width: 600px) { .alignleft, .alignright { float: none; margin: 1em 0; } }

/* Display Posts Shortcode plugin output */
.display-posts-listing { list-style: none !important; padding: 0 !important; }
.display-posts-listing .listing-item { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.display-posts-listing .listing-item::marker { content: none; }
.display-posts-listing .title { font-weight: 600; }
.display-posts-listing .date { display: block; font-size: var(--step--1); color: var(--muted); }

/* ---------- Document lists (disclosures, reports, policies) ---------- */
.doc-group { margin: 1.25em 0 2.25em; }
.doc-group-title { font-size: var(--step-1); margin: 0 0 .75rem; }
.doc-filter { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .75rem; }
.doc-filter .search-form { flex: 1 1 260px; max-width: 420px; }
.entry-content .doc-filter .search-field { border: 0; box-shadow: none; padding: .55rem .25rem; }
.doc-filter-count { font-size: var(--step--1); color: var(--muted); }
.entry-content .doc-list, .doc-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.entry-content .doc-list li { margin: 0; }
.doc + .doc { border-top: 1px solid var(--line); }
.doc[hidden] { display: none; }
.doc-link {
	display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem;
	padding: .8rem 1rem; color: var(--text); text-decoration: none; line-height: 1.35;
}
.doc-link:hover { background: var(--surface); color: var(--ink); }
.doc-link:hover .doc-title { text-decoration: underline; text-decoration-color: var(--red); }
.doc-type {
	display: grid; place-items: center; width: 42px; height: 26px;
	font: 700 .7rem/1 var(--font-body); letter-spacing: .02em;
	color: #fff; background: var(--red); border-radius: 3px;
}
.doc-type-doc, .doc-type-docx { background: #2D5BA8; }
.doc-type-xls, .doc-type-xlsx, .doc-type-csv { background: #237A4B; }
.doc-type-mp4, .doc-type-jpg, .doc-type-png { background: var(--muted); }
.doc-title { font-weight: 600; }
.doc-meta { font-size: var(--step--1); color: var(--muted); white-space: nowrap; }
.doc-empty { padding: 1rem; margin: 0; color: var(--muted); }
@media (max-width: 560px) {
	.doc-link { grid-template-columns: auto 1fr; }
	.doc-meta { grid-column: 2; }
}

/* Old theme lists rendered before the shortcode fix (e.g. cached HTML) */
.bsk-files-category:not(.doc-group) ul { padding-left: 1.2em; }

/* ---------- Homepage ---------- */
.home-intro { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(1.5rem, 4vw, 2.5rem); }
.home-title { font-size: var(--step-4); font-weight: 700; max-width: 18ch; margin-bottom: .3em; text-wrap: balance; }
.home-tagline { font-size: var(--step-1); color: var(--muted); max-width: 52ch; margin: 0; }
.shortcuts { padding-bottom: clamp(2rem, 5vw, 3rem); }
.shortcut-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 1rem; }
.shortcut {
	position: relative; display: flex; flex-direction: column; gap: .3rem; height: 100%; min-height: 120px;
	padding: 1.25rem 1.25rem 2.75rem; border: 1px solid var(--line); border-top: 3px solid var(--ink); border-radius: 0 0 var(--radius) var(--radius);
	color: var(--text); text-decoration: none; background: #fff; transition: border-color .15s, background-color .15s;
}
.shortcut:hover { border-top-color: var(--red); background: var(--surface); color: var(--ink); }
.shortcut-title { font: 600 var(--step-1)/1.25 var(--font-head); color: var(--ink); }
.shortcut-desc { font-size: var(--step--1); color: var(--muted); }
.shortcut .icon { position: absolute; left: 1.25rem; bottom: 1rem; color: var(--red); transition: transform .15s; }
.shortcut:hover .icon { transform: translateX(4px); }
.home .layout { padding-top: clamp(1.5rem, 4vw, 2.5rem); border-top: 1px solid var(--line); }
.home-news { background: var(--surface); border-top: 1px solid var(--line); padding-block: clamp(2.5rem, 6vw, 4rem); }

/* ---------- Listings ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.section-title { font-size: var(--step-2); margin: 0; }
.post-list { border-top: 2px solid var(--ink); }
.post-row { border-bottom: 1px solid var(--line); }
.post-row-link { display: block; padding: 1.1rem 0; color: inherit; text-decoration: none; }
.post-row-link:hover .post-row-title { color: var(--red-dark); text-decoration: underline; }
.post-row-meta { margin: 0 0 .25rem; font-size: var(--step--1); color: var(--muted); font-weight: 600; }
.post-row-title { font-size: var(--step-1); margin: 0 0 .3rem; }
.post-row-excerpt { margin: 0; color: var(--muted); }
.home-news .post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 0 2rem; }
.listing-search { max-width: 560px; margin-bottom: 2rem; }
.empty-state { padding: 2rem; background: var(--surface); border-radius: var(--radius); }
.empty-state p { margin: 0; }
.lead { font-size: var(--step-1); }

.pagination { margin-top: 2rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .4rem; }
.page-numbers { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 .7rem; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; font-weight: 600; }
.page-numbers.current, .page-numbers:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.page-numbers.dots { border: 0; }
.post-navigation { margin-top: 3rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.post-navigation .nav-next { text-align: right; }
.post-navigation a { text-decoration: none; color: var(--ink); font-weight: 600; }
.post-navigation a:hover { color: var(--red-dark); }
.nav-label { display: block; font-size: var(--step--1); color: var(--muted); font-weight: 400; }

/* ---------- Forms & comments ---------- */
.entry-content input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not(.search-field),
.entry-content select, .entry-content textarea,
.comment-form input:not([type="checkbox"]):not([type="submit"]), .comment-form textarea {
	width: 100%; max-width: 100%; padding: .65rem .8rem; font: inherit; color: var(--ink);
	border: 1px solid #B9C0CA; border-radius: var(--radius); background: #fff;
}
.entry-content input:focus, .entry-content select:focus, .entry-content textarea:focus,
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(29,33,41,.12); }
.entry-content input[type="submit"], .entry-content button, .comment-form .submit {
	min-height: 44px; padding: .6rem 1.2rem; border: 0; border-radius: var(--radius);
	background: var(--red); color: #fff; font: 600 1rem var(--font-body); cursor: pointer;
}
.comments { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding-top: clamp(2.5rem, 6vw, 3.5rem); font-size: .97rem; }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.footer-brand img { display: block; height: 40px; width: auto; }
.footer-tagline { margin: 0; color: var(--muted); max-width: 48ch; }
.footer-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 2rem 2.5rem; padding-block: 2rem; border-bottom: 1px solid var(--line); }
.footer-widgets .widget-title { border-bottom-width: 1px; border-bottom-color: var(--line); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding-block: 1.25rem 1.75rem; color: var(--muted); font-size: var(--step--1); }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--muted); }

/* ---------- Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
	.site-header, .site-footer, .page-sidebar, .crumbs, .doc-filter, .shortcuts { display: none !important; }
	.layout.has-sidebar { display: block; }
	.page-head { background: none; border: 0; padding: 0 0 1rem; }
	body { font-size: 11pt; }
	.doc-link::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; }
}
