/*
Theme Name: findebill
Theme URI: https://findebill.com
Author: findebill
Description: A clean, fast theme for utility bill payment guides. Category tabs for Water, Gas, Electricity and Internet, browsing by state, official-source boxes and AdSense-ready ad areas.
Version: 1.0.0
Requires at least: 6.3
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: findebill
*/

:root {
	--ink: #13233a;
	--ink-soft: #3b4b61;
	--muted: #586679;
	--line: #d8dfe7;
	--paper: #ffffff;
	--wash: #f0f4f8;
	--brand: #0d6b52;
	--brand-dark: #084d3b;
	--link: #0a58a8;
	--water: #1d7fd6;
	--water-light: #6bb6f5;
	--gas: #d4571f;
	--gas-light: #ff9a6a;
	--electricity: #e0a100;
	--electricity-light: #f6c944;
	--internet: #6a4fcf;
	--internet-light: #b2a0f5;
	--c: var(--ink);
	--cl: #ffffff;
	--on: #ffffff;
	--serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--radius: 6px;
	--wrap: 1120px;
}

.c-water { --c: var(--water); --cl: var(--water-light); --on: #ffffff; }
.c-gas { --c: var(--gas); --cl: var(--gas-light); --on: #ffffff; }
.c-electricity { --c: var(--electricity); --cl: var(--electricity-light); --on: var(--ink); }
.c-internet { --c: var(--internet); --cl: var(--internet-light); --on: #ffffff; }
.c-states { --c: var(--brand); --cl: #6fd3b1; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 1rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.25; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	white-space: nowrap;
}

.skip-link:focus {
	clip: auto;
	clip-path: none;
	background: var(--paper);
	color: var(--ink);
	height: auto;
	width: auto;
	left: 8px;
	top: 8px;
	padding: 12px 16px;
	z-index: 100;
	border-radius: var(--radius);
	box-shadow: 0 0 0 2px var(--ink);
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { background: var(--paper); }

.header-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-top: 14px;
	padding-bottom: 14px;
}

.brand-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--ink);
	text-decoration: none;
}

.brand-link .icon { color: var(--brand); }

.brand-name {
	font-family: var(--serif);
	font-size: 1.65rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.brand .custom-logo { display: block; max-height: 48px; width: auto; }

.search-toggle {
	display: none;
	background: none;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	color: var(--ink);
	padding: 8px 10px;
	cursor: pointer;
}

.header-search { flex: 0 1 380px; }
.header-search .search-form { max-width: none; }
.header-search .search-field { padding: 9px 12px; font-size: 0.95rem; }
.header-search .search-submit { padding: 9px 14px; font-size: 0.95rem; }

.cat-tabs { background: var(--ink); }

.cat-tabs ul {
	display: flex;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
	overflow-x: auto;
	scrollbar-width: none;
}

.cat-tabs ul::-webkit-scrollbar { display: none; }

.tab {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 14px 18px 11px;
	color: #ffffff;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	border-bottom: 4px solid transparent;
}

.tab .icon { color: var(--cl); }
.tab:hover { background: rgba(255, 255, 255, 0.1); color: #ffffff; }
.tab[aria-current="page"] { background: rgba(255, 255, 255, 0.14); border-bottom-color: var(--cl); }
.tab:focus-visible { outline-color: #ffffff; outline-offset: -3px; }

/* Forms */
.search-form { display: flex; max-width: 640px; }

.search-field {
	flex: 1;
	min-width: 0;
	padding: 14px 16px;
	font: inherit;
	color: var(--ink);
	background: var(--paper);
	border: 2px solid var(--ink);
	border-right: 0;
	border-radius: var(--radius) 0 0 var(--radius);
}

.search-submit {
	padding: 14px 22px;
	font: inherit;
	font-weight: 600;
	color: #ffffff;
	background: var(--brand);
	border: 2px solid var(--brand);
	border-radius: 0 var(--radius) var(--radius) 0;
	cursor: pointer;
}

.search-submit:hover { background: var(--brand-dark); border-color: var(--brand-dark); }

/* Home */
.hero { background: var(--wash); padding: 56px 0 56px; }

.hero h1 {
	font-size: clamp(2.2rem, 5vw, 3.4rem);
	margin: 0 0 14px;
	max-width: 18ch;
	letter-spacing: -0.015em;
}

.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 58ch; margin: 0 0 24px; }

.stub-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
	list-style: none;
	margin: 40px 0 0;
	padding: 0;
}

.stub {
	position: relative;
	display: grid;
	grid-template-columns: 76px 1fr;
	min-height: 120px;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	color: var(--ink);
	text-decoration: none;
}

.stub::before,
.stub::after {
	content: "";
	position: absolute;
	left: 67px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--wash);
}

.stub::before { top: -10px; }
.stub::after { bottom: -10px; }

.stub-tab {
	display: grid;
	place-items: center;
	background: var(--c);
	color: var(--on);
	border-right: 2px dashed rgba(255, 255, 255, 0.8);
	border-radius: 5px 0 0 5px;
}

.stub-body { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; }
.stub-title { font-family: var(--serif); font-size: 1.4rem; font-weight: 700; line-height: 1.2; }
.stub-desc { font-size: 0.95rem; color: var(--ink-soft); }
.stub-count { margin-top: auto; padding-top: 6px; font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.stub:hover { border-color: var(--ink); color: var(--ink); }
.stub:hover .stub-title { text-decoration: underline; text-underline-offset: 4px; }

.section { padding: 52px 0; }
.section-wash { background: var(--wash); }
.section-title { font-size: 1.7rem; margin: 0 0 24px; }
.section-link { margin: 24px 0 0; font-weight: 600; }

.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }
.trust-grid h3 { font-size: 1.2rem; margin: 0 0 6px; }
.trust-grid p { margin: 0; color: var(--ink-soft); max-width: 40ch; }

/* Post rows */
.row-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
	gap: 8px 48px;
}

.row-list-single { grid-template-columns: minmax(0, 820px); }

.row {
	border-left: 4px solid var(--c);
	padding: 2px 0 2px 18px;
	margin: 0 0 28px;
}

.row-title { font-size: 1.35rem; line-height: 1.3; margin: 0 0 6px; }
.row-title a { color: var(--ink); text-decoration: none; }
.row-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.row-excerpt { margin: 0 0 8px; color: var(--ink-soft); max-width: 68ch; }

.row-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	margin: 0;
	font-size: 0.875rem;
	color: var(--muted);
}

.row-meta > span + span { padding-left: 16px; border-left: 1px solid var(--line); }
.row-cat { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); }
.row-cat .icon { color: var(--c); }

/* States */
.state-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 10px 16px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.state-grid a,
.state-soon {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	padding: 11px 14px;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	color: var(--ink);
	text-decoration: none;
	font-weight: 600;
}

.state-grid a:hover { border-color: var(--ink); }
.state-soon { color: var(--muted); background: transparent; font-weight: 400; }
.state-count { font-size: 0.8rem; font-weight: 400; color: var(--muted); }
.state-filter { max-width: 360px; }
.state-filter input { width: 100%; padding: 12px 14px; font: inherit; border: 2px solid var(--ink); border-radius: var(--radius); }
.state-grid-all { margin-top: 8px; }

/* Archive and page */
.page-wrap { padding-top: 24px; padding-bottom: 64px; }

.archive-head { padding: 12px 0 28px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.archive-head h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); margin: 0 0 12px; letter-spacing: -0.01em; }
.archive-head .lede { margin-bottom: 20px; }

.archive-icon {
	display: inline-grid;
	place-items: center;
	width: 52px;
	height: 52px;
	margin-bottom: 14px;
	border-radius: var(--radius);
	background: var(--c);
	color: var(--on);
}

.empty { color: var(--ink-soft); }

.crumbs { margin: 0 0 12px; font-size: 0.875rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; margin: 0; padding: 0; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line); }
.crumbs a { color: var(--ink-soft); }

.pagination { margin: 24px 0 0; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }

.pagination .page-numbers {
	padding: 8px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	color: var(--ink);
	text-decoration: none;
}

.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: #ffffff; }

/* Single */
.layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 56px;
	padding-top: 28px;
	padding-bottom: 72px;
}

.entry-header { margin-bottom: 22px; }

.cat-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	color: var(--ink);
	text-decoration: none;
}

.cat-chip .icon { color: var(--c); }
.cat-chip:hover { text-decoration: underline; }

.entry-title {
	font-size: clamp(2rem, 4.2vw, 2.9rem);
	line-height: 1.15;
	letter-spacing: -0.015em;
	margin: 10px 0 14px;
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	margin: 0;
	font-size: 0.9rem;
	color: var(--muted);
}

.entry-meta > span + span { padding-left: 16px; border-left: 1px solid var(--line); }

.source-box {
	display: grid;
	gap: 2px;
	margin: 0 0 28px;
	padding: 16px 18px;
	background: var(--wash);
	border: 1px solid var(--line);
	border-left: 4px solid var(--brand);
	border-radius: var(--radius);
}

.source-box p { margin: 0; }
.source-label { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--brand-dark); }
.source-link { font-size: 1.05rem; font-weight: 600; }
.source-date { font-size: 0.9rem; color: var(--muted); }

.entry-image { margin: 0 0 28px; }
.entry-image img { display: block; border-radius: var(--radius); }

.entry-content {
	font-family: var(--serif);
	font-size: 1.15rem;
	line-height: 1.75;
	max-width: 70ch;
}

.entry-content > * { margin-top: 0; margin-bottom: 1.25em; }
.entry-content h2 { font-size: 1.75rem; margin: 2em 0 0.6em; scroll-margin-top: 16px; }
.entry-content h3 { font-size: 1.35rem; margin: 1.6em 0 0.5em; }
.entry-content ul,
.entry-content ol { padding-left: 1.4em; }
.entry-content li { margin-bottom: 0.4em; }
.entry-content a { color: var(--link); }
.entry-content blockquote { margin-left: 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--line); color: var(--ink-soft); }
.entry-content figure { margin-left: 0; margin-right: 0; }
.entry-content figcaption { font-family: var(--sans); font-size: 0.875rem; color: var(--muted); margin-top: 6px; }

.entry-content table {
	display: block;
	width: 100%;
	overflow-x: auto;
	border-collapse: collapse;
	font-family: var(--sans);
	font-size: 1rem;
	line-height: 1.5;
}

.entry-content th,
.entry-content td { padding: 10px 12px; text-align: left; border: 1px solid var(--line); vertical-align: top; }
.entry-content th { background: var(--wash); }

.toc {
	font-family: var(--sans);
	font-size: 1rem;
	line-height: 1.5;
	padding: 18px 22px;
	background: var(--wash);
	border: 1px solid var(--line);
	border-radius: var(--radius);
}

.toc-title { margin: 0 0 8px; font-weight: 700; }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc li { margin-bottom: 0.3em; }

.entry-note { margin: 28px 0 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); }

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 32px; padding: 0; }

.chip-list a {
	display: inline-block;
	padding: 6px 12px;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--ink);
	font-size: 0.9rem;
	text-decoration: none;
}

.chip-list a:hover { border-color: var(--ink); }

.related { margin-top: 40px; }
.related .section-title { font-size: 1.4rem; }

/* Sidebar */
.sidebar { font-size: 0.95rem; }
.widget { margin: 0 0 32px; }
.widget-title { font-size: 1.2rem; margin: 0 0 10px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { border-top: 1px solid var(--line); }
.widget li:last-child { border-bottom: 1px solid var(--line); }
.widget li a { display: block; padding: 10px 0; color: var(--ink); text-decoration: none; }
.widget li a:hover { text-decoration: underline; }

/* Ads */
.ad-slot { margin: 32px 0; text-align: center; }
.ad-label { margin: 0 0 6px; font-size: 0.75rem; color: var(--muted); text-align: center; }
.sidebar .ad-slot { margin-top: 0; }

/* Comments */
.comments { margin-top: 48px; }
.comment-list { padding-left: 0; list-style: none; }
.comment-list .comment-body { padding: 16px 0; border-top: 1px solid var(--line); }
.comment-form label { display: block; font-weight: 600; margin-bottom: 4px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea { width: 100%; padding: 10px 12px; font: inherit; border: 1px solid var(--ink-soft); border-radius: var(--radius); }
.comment-form .submit { padding: 12px 22px; font: inherit; font-weight: 600; color: #ffffff; background: var(--brand); border: 0; border-radius: var(--radius); cursor: pointer; }

/* Footer */
.site-footer { background: var(--ink); color: #d3dce8; padding: 48px 0 24px; font-size: 0.95rem; }
.site-footer a { color: #ffffff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-brand { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: #ffffff; margin: 0 0 8px; }
.footer-about p { max-width: 46ch; margin: 0; }
.footer-title { margin: 0 0 10px; font-weight: 700; color: #ffffff; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-base { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.18); font-size: 0.85rem; }
.footer-base p { margin: 0; }

/* Responsive */
@media (max-width: 960px) {
	.layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.footer-about { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
	.search-toggle { display: inline-flex; }
	.header-bar { flex-wrap: wrap; }
	.header-search { flex-basis: 100%; display: none; }
	.header-search.is-open { display: block; }
	.hero { padding: 36px 0 40px; }
	.search-form { flex-wrap: nowrap; }
	.section { padding: 40px 0; }
	.row-list { grid-template-columns: minmax(0, 1fr); }
	.entry-content { font-size: 1.1rem; }
}

/* Calculator */
.fbc { margin: 0 0 40px; font-family: var(--sans); font-size: 1rem; line-height: 1.5; }
.fbc-title { font-family: var(--serif); font-size: 1.5rem; margin: 0 0 16px; }
.fbc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px 22px; margin: 0 0 24px; }
.fbc-field label { display: block; font-weight: 600; margin: 0 0 4px; }

.fbc input,
.fbc select {
	width: 100%;
	padding: 11px 12px;
	font: inherit;
	color: var(--ink);
	background: var(--paper);
	border: 2px solid var(--ink);
	border-radius: var(--radius);
}

.fbc-help { margin: 4px 0 0; font-size: 0.875rem; color: var(--muted); }

.fbc-result {
	display: grid;
	grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
	gap: 20px 28px;
	margin: 8px 0 36px;
	padding: 26px;
	background: var(--ink);
	color: #ffffff;
	border-radius: var(--radius);
}

.fbc-total-label { margin: 0; color: #d3dce8; }
.fbc-total { margin: 4px 0 0; font-family: var(--serif); font-size: clamp(2.6rem, 8vw, 4rem); font-weight: 700; line-height: 1.05; }
.fbc-sub { display: grid; gap: 12px; align-content: center; }
.fbc-sub p { margin: 0; color: #d3dce8; }
.fbc-sub strong { display: block; font-family: var(--serif); font-size: 1.6rem; color: #ffffff; }

.fbc-detail {
	grid-column: 1 / -1;
	margin: 0;
	padding: 14px 0 0;
	list-style: none;
	border-top: 1px solid rgba(255, 255, 255, 0.22);
	font-size: 0.95rem;
	color: #d3dce8;
}

.fbc-detail li { margin-bottom: 4px; }
.fbc-appl { padding-top: 28px; border-top: 1px solid var(--line); }
.fbc-days { max-width: 220px; margin: 12px 0 18px; }

.fbc-row {
	display: grid;
	grid-template-columns: minmax(160px, 2fr) 96px 110px 80px minmax(90px, 1fr) auto;
	gap: 10px;
	align-items: center;
	margin: 0 0 10px;
}

.fbc-head { font-size: 0.85rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.fbc-cost { font-weight: 700; }

.fbc-btn,
.fbc-remove {
	padding: 10px 16px;
	font: inherit;
	font-weight: 600;
	color: var(--ink);
	background: var(--paper);
	border: 2px solid var(--ink);
	border-radius: var(--radius);
	cursor: pointer;
}

.fbc-remove { padding: 8px 12px; font-weight: 400; border-color: var(--line); color: var(--ink-soft); }
.fbc-btn:hover,
.fbc-remove:hover { background: var(--wash); }
.fbc-btn-primary { color: #ffffff; background: var(--brand); border-color: var(--brand); }
.fbc-btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.fbc-actions { margin: 14px 0 20px; }

.fbc-appl-total {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
	align-items: center;
	justify-content: space-between;
	padding: 16px 18px;
	background: var(--wash);
	border: 1px solid var(--line);
	border-radius: var(--radius);
}

.fbc-appl-total p { margin: 0; font-size: 1.1rem; }
.fbc-note { margin: 24px 0 0; font-size: 0.875rem; color: var(--muted); }

@media (max-width: 720px) {
	.fbc-result { grid-template-columns: minmax(0, 1fr); padding: 20px; }
	.fbc-head { display: none; }
	.fbc-row { grid-template-columns: 1fr 1fr 1fr; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
	.fbc-row select { grid-column: 1 / -1; }
	.fbc-cost { grid-column: 1 / 3; }
}
