/*
Theme Name: Porchlight
Description: A notebook-style theme for a small neighborhood: one reading column, stories listed by date, and a short list of what's coming up.
Version: 1.2.3
Requires at least: 6.5
Requires PHP: 8.0
Author: Team DDA
License: GPL-2.0-or-later
Text Domain: porchlight
*/

/* One centered reading column under a spruce header band. Dates sit in a ledger column at the left of every list. */
@font-face { font-family: "Young Serif"; font-weight: 400; font-style: normal; font-display: swap; src: url(assets/fonts/young-serif-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 400; font-style: normal; font-display: swap; src: url(assets/fonts/figtree-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 400; font-style: italic; font-display: swap; src: url(assets/fonts/figtree-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-style: normal; font-display: swap; src: url(assets/fonts/figtree-latin-600-normal.woff2) format("woff2"); }

:root {
	--spruce: #1f3a2e;
	--spruce-soft: #2c4c3d;
	--ink: #1d2521;
	--quiet: #5d6a62;
	--moss: #3b6a33;
	--lamp: #f0b431;
	--rule: #dde4dd;
	--wash: #f1f5ef;
	--page: #ffffff;
	--serif: "Young Serif", Georgia, "Times New Roman", serif;
	--sans: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--col: 42rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 1.125rem/1.68 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--moss); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--lamp); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.18; margin: 0 0 0.5em; text-wrap: balance; }
p { margin: 0 0 1.05em; }

.pl-col { width: min(100% - 32px, var(--col)); margin-inline: auto; }
.pl-skip { position: absolute; left: -999px; }
.pl-skip:focus { left: 12px; top: 12px; z-index: 50; background: #fff; color: var(--ink); padding: 8px 12px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header band */
.pl-band { background: var(--spruce); color: #fff; }
.pl-band__inner { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 28px; padding-block: 22px 20px; }
.pl-name { font-family: var(--serif); font-size: 1.6rem; color: #fff; text-decoration: none; line-height: 1.1; }
.pl-name img { max-height: 48px; width: auto; }
.pl-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.pl-nav a { color: #e4ece6; text-decoration: none; font-size: 1rem; font-weight: 600; padding-bottom: 3px; border-bottom: 2px solid transparent; }
.pl-nav a:hover, .pl-nav .is-here a { color: #fff; border-bottom-color: var(--lamp); }

/* Home opener */
.pl-hello { padding-block: clamp(40px, 7vw, 72px) 8px; }
.pl-hello p { font-family: var(--serif); font-size: clamp(1.55rem, 3.6vw, 2.15rem); line-height: 1.3; margin: 0; color: var(--ink); }

/* Next up strip */
.pl-next { margin-block: 36px 8px; border-block: 1px solid var(--rule); padding-block: 16px; }
.pl-next h2 { font-family: var(--sans); font-size: 1rem; font-weight: 600; color: var(--quiet); margin: 0 0 10px; }
.pl-next ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pl-next li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 12px; align-items: baseline; }
.pl-next time { font-weight: 600; color: var(--spruce); font-variant-numeric: tabular-nums; }
.pl-next a { color: var(--ink); text-decoration: none; font-weight: 600; }
.pl-next a:hover { color: var(--moss); text-decoration: underline; }
.pl-next .pl-more { display: inline-block; margin-top: 10px; font-size: 0.95rem; }

/* The ledger: date column + entry */
.pl-section-title { font-size: 1.5rem; margin: 48px 0 6px; }
.pl-ledger { list-style: none; margin: 0; padding: 0; }
.pl-entry { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 18px; padding-block: 24px; border-bottom: 1px solid var(--rule); }
.pl-entry:last-child { border-bottom: 0; }
.pl-date { text-align: left; line-height: 1; padding-top: 4px; }
.pl-date .m { display: block; font-size: 0.85rem; font-weight: 600; color: var(--quiet); }
.pl-date .d { display: inline-block; font-family: var(--serif); font-size: 2.1rem; color: var(--spruce); margin-top: 4px; padding-bottom: 4px; border-bottom: 3px solid var(--lamp); font-variant-numeric: tabular-nums; }
.pl-entry h3 { font-size: 1.4rem; margin: 0 0 6px; }
.pl-entry h3 a { color: var(--ink); text-decoration: none; }
.pl-entry h3 a:hover { color: var(--moss); text-decoration: underline; }
.pl-entry p { margin: 0; color: var(--quiet); font-size: 1.02rem; }
.pl-entry .pl-filed { margin-top: 8px; font-size: 0.9rem; color: var(--quiet); }
.pl-entry .pl-filed a { color: var(--quiet); }
.pl-entry .pl-pic { margin-top: 14px; border-radius: 6px; overflow: hidden; }
@media (max-width: 520px) {
	.pl-entry { grid-template-columns: 3.4rem minmax(0, 1fr); gap: 12px; }
	.pl-date .d { font-size: 1.7rem; }
	.pl-next li { grid-template-columns: 1fr; gap: 0; }
}

/* Page headers */
.pl-head { padding-block: clamp(36px, 6vw, 60px) 12px; border-bottom: 1px solid var(--rule); margin-bottom: 8px; }
.pl-head h1 { font-size: clamp(2rem, 5vw, 2.7rem); margin: 0 0 10px; }
.pl-head p { color: var(--quiet); margin: 0; }
.pl-head .pl-listings { margin: 18px 0 6px; padding: 12px 16px; background: var(--wash); border-left: 4px solid var(--lamp); color: var(--ink); }
.pl-listings a { color: var(--spruce); font-weight: 600; text-underline-offset: 0.2em; }
.pl-listings a:hover { color: var(--moss); }

/* Story */
.pl-story-head { padding-block: clamp(36px, 6vw, 64px) 20px; }
.pl-story-head h1 { font-size: clamp(2.1rem, 5.4vw, 3rem); margin: 0 0 14px; }
.pl-byline { color: var(--quiet); font-size: 0.98rem; margin: 0; }
.pl-byline a { color: var(--quiet); }
.pl-lede { font-size: 1.25rem; color: var(--ink); margin: 0 0 18px; }
.pl-figure { margin: 8px 0 32px; }
.pl-figure img { border-radius: 6px; width: 100%; }
.pl-figure figcaption { font-size: 0.9rem; color: var(--quiet); margin-top: 8px; }
.pl-body h2 { font-size: 1.65rem; margin-top: 1.7em; }
.pl-body h3 { font-size: 1.3rem; margin-top: 1.4em; }
.pl-body ul, .pl-body ol { padding-left: 1.25em; }
.pl-body li { margin-bottom: 0.4em; }
.pl-body li::marker { color: var(--moss); }
.pl-body blockquote { margin: 1.8em 0; padding: 18px 22px; background: var(--wash); border-radius: 6px; font-family: var(--serif); font-size: 1.3rem; line-height: 1.4; }
.pl-body blockquote p:last-child { margin: 0; }
.pl-body figure { margin: 1.6em 0; }
.pl-body figure img { border-radius: 6px; }
.pl-body figcaption { font-size: 0.9rem; color: var(--quiet); }
.pl-body table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.pl-body th, .pl-body td { text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--rule); }
.pl-notes { margin-top: 2.2em; padding-top: 1em; border-top: 1px solid var(--rule); font-size: 0.95rem; color: var(--quiet); }
.pl-notes p { margin-bottom: 0.3em; font-weight: 600; }
.pl-notes ul { margin: 0; padding-left: 1.1em; }
.pl-notes a { color: var(--quiet); }
.pl-after { margin-top: 40px; padding-top: 18px; border-top: 3px solid var(--lamp); font-size: 0.98rem; color: var(--quiet); }
.pl-after p { margin: 0 0 6px; }

/* Event */
.pl-facts { margin: 0 0 28px; padding: 0; list-style: none; border-block: 1px solid var(--rule); }
.pl-facts li { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.pl-facts li:last-child { border-bottom: 0; }
.pl-facts span:first-child { color: var(--quiet); }

/* Signup */
.pl-signup { margin-block: 48px 0; background: var(--wash); border-radius: 8px; padding: 22px; }
.pl-signup h2 { font-size: 1.35rem; margin-bottom: 4px; }
.pl-signup p { color: var(--quiet); margin-bottom: 12px; }
.pl-signup form { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-signup input { flex: 1 1 220px; min-width: 0; font: inherit; font-size: 1rem; padding: 10px 12px; border: 1px solid #c8d2c9; border-radius: 6px; background: #fff; }
.pl-btn, .pl-signup button, .pl-search button { font: 600 1rem/1 var(--sans); background: var(--spruce); color: #fff; border: 0; border-radius: 6px; padding: 12px 18px; cursor: pointer; }
.pl-btn:hover, .pl-signup button:hover, .pl-search button:hover { background: var(--spruce-soft); }

.pl-pages { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; font-weight: 600; }
.pl-empty { padding-block: 28px 56px; color: var(--quiet); }
.pl-search { display: flex; gap: 8px; margin-top: 16px; }
.pl-search input { flex: 1; min-width: 0; font: inherit; padding: 10px 12px; border: 1px solid #c8d2c9; border-radius: 6px; }

/* Footer band */
.pl-foot { background: var(--spruce); color: #dfe8e1; margin-top: 72px; }
.pl-foot__inner { padding-block: 36px 28px; display: grid; gap: 18px; }
.pl-foot .pl-name { font-size: 1.35rem; }
.pl-foot .pl-nav a { color: #dfe8e1; }
.pl-foot p { margin: 0; font-size: 0.95rem; max-width: 62ch; }
.pl-foot a { color: #fff; }
.pl-foot small { color: #b8c7bc; font-size: 0.85rem; }

@media print { .pl-band, .pl-foot, .pl-signup { display: none; } }

/* ---------- Community Content Studio: guide pages, maps, question box ---------- */
body {
	--ccs-ink: var(--ink); --ccs-muted: var(--quiet); --ccs-line: var(--rule); --ccs-surface: var(--wash);
	--ccs-accent: var(--spruce); --ccs-radius: 6px; --ccs-font-ui: var(--sans);
	--ccs-pin-park: var(--moss);
}
.pl-story-head .ccs-crumbs { margin-bottom: .6em; }
.pl-story-head .ccs-reviewed { margin: .6em 0 0; }
.pl-body .ccs-ask h2 { font-size: 1.4rem; }
.pl-body .ccs-sources h2 { font-family: var(--sans); font-size: .95rem; font-weight: 600; color: var(--quiet); margin: 0 0 .4em; }
.ccs-ask button { color: #fff; }
.pl-foot .pl-independent { font-size: .88rem; opacity: .85; margin-top: -.4em; }
.pl-body .ccs-sources { margin-top: 2.4em; padding-top: 1.1em; border-top: 1px solid var(--rule); font-size: .92rem; color: var(--quiet); }
.pl-body .ccs-sources ul { margin: 0; padding-left: 1.1em; }
.pl-body .ccs-sources a { color: var(--quiet); }

/* Home page photo (Customize > Home page and footer) */
.pl-photo { margin: 0 0 clamp(22px, 4vw, 34px); }
.pl-photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; object-position: center var(--focus, center); border-radius: 6px; }
.pl-photo figcaption { font-family: var(--sans); font-size: .88rem; color: var(--quiet); margin-top: 8px; }

/* Guide button under the home page intro */
.pl-hello .pl-guide-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	margin-top: 22px;
	padding: 0.7em 1.35em 0.7em 1.05em;
	border: 2px solid var(--spruce);
	border-radius: 999px;
	background: var(--wash);
	color: var(--spruce);
	font-family: var(--sans);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}
.pl-hello .pl-guide-btn::before {
	content: "";
	flex: none;
	width: 0.7em;
	height: 0.7em;
	border-radius: 50%;
	background: var(--lamp);
	box-shadow: 0 0 0 4px rgba(240, 180, 49, 0.28);
}
.pl-hello .pl-guide-btn:hover,
.pl-hello .pl-guide-btn:focus-visible {
	background: var(--spruce);
	color: #fff;
}
