/*
Theme Name: Aging in Place Costs
Theme URI: https://aginginplacecosts.com
Author: Aging in Place Costs
Description: Custom block theme for Aging in Place Costs — a warm, editorial, trust-first reference for home-mobility costs and state-by-state coverage. Georgia serif headings, teal/terracotta palette, sand surfaces, large readable type, full light/dark support. Encyclopedia-Rail architecture (guide-index rail + cost-table shelves + stat band; entry = article + sticky cost-facts rail). Markers: aipc-theme-v2, aipc-layout-rail.
Version: 3.0.0
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aging-in-place-costs
*/

/* ============================================================
   Aging in Place Costs — rebuild 2026-07 (marker: aipc-theme-v2)
   Identity fixed by brand.md: warm off-white base, teal + terracotta,
   sand surfaces, Georgia serif headings, large readable body.
   ============================================================ */

/* ---- Local surface tokens (flip in dark mode) ---- */
:root {
	--aipc-card: #ffffff;         /* white cards on warm base (light) */
	--aipc-input: #ffffff;
	--aipc-shadow: 0 1px 2px rgba(31,42,46,.05);
	--aipc-shadow-hover: 0 6px 20px rgba(31,42,46,.10);
	--aipc-chip-yes-bg: #d8ede9;  --aipc-chip-yes-fg: #0b5a4c;
	--aipc-chip-no-bg:  #f4e0d6;  --aipc-chip-no-fg:  #8a3d1c;
	--aipc-chip-var-bg: #efe7d6;  --aipc-chip-var-fg: #6a5636;
	--aipc-band-fg: #ffffff;      /* text on the teal hero band */
}

/* ---- Dark mode: remap the same semantic tokens (keep hue, lift luminance) ---- */
@media (prefers-color-scheme: dark) {
	:root {
		--wp--preset--color--base:      #16191A;
		--wp--preset--color--contrast:  #ECEAE3;
		--wp--preset--color--primary:   #43A9A6;
		--wp--preset--color--secondary: #E08A5C;
		--wp--preset--color--surface:   #21262A;
		--wp--preset--color--muted:     #A7B0AE;
		--wp--preset--color--line:      #333B3C;
		--wp--preset--color--covered:   #46B588;
		--wp--preset--color--danger:    #E27567;

		--aipc-card: #1E2427;
		--aipc-input: #1E2427;
		--aipc-shadow: 0 1px 2px rgba(0,0,0,.35);
		--aipc-shadow-hover: 0 6px 22px rgba(0,0,0,.45);
		--aipc-chip-yes-bg: #16332b; --aipc-chip-yes-fg: #7bd6b7;
		--aipc-chip-no-bg:  #3a241a; --aipc-chip-no-fg:  #f0a884;
		--aipc-chip-var-bg: #2c2a22; --aipc-chip-var-fg: #ccbf9c;
	}
}

/* ---- Base rhythm ---- */
body { -webkit-font-smoothing: antialiased; }
main { display: block; }
p { max-width: 68ch; }
.alignwide p, .aipc-hero p, .has-text-align-center { max-width: none; }

/* Accessible focus ring everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible,
.wp-block-search__input:focus-visible,
.wp-element-button:focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
	border-radius: 3px;
}

/* Underline-grow micro-interaction on body links */
.entry-content a,
.aipc-prose a {
	text-underline-offset: 0.15em;
	text-decoration-thickness: 1px;
	transition: text-decoration-color .15s ease;
}
.entry-content a:hover { text-decoration-thickness: 2px; }

/* ============================================================
   Header + wordmark
   ============================================================ */
.aipc-logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; line-height: 1; }
.aipc-logo:focus-visible { outline-offset: 4px; }
.aipc-logo__glyph { flex: 0 0 auto; width: 34px; height: 34px; display: block; }
.aipc-logo__glyph .roof { fill: var(--wp--preset--color--primary); }
.aipc-logo__glyph .body { fill: none; stroke: var(--wp--preset--color--primary); stroke-width: 2.2; }
.aipc-logo__glyph .step { stroke: var(--wp--preset--color--secondary); stroke-width: 2.2; stroke-linecap: round; }
.aipc-logo__text {
	font-family: var(--wp--preset--font-family--serif);
	font-weight: 700;
	font-size: 1.4rem;
	letter-spacing: -0.01em;
	color: var(--wp--preset--color--contrast);
}
.aipc-logo__text .accent { color: var(--wp--preset--color--secondary); }
.aipc-logo__tag {
	display: block;
	font-family: var(--wp--preset--font-family--system);
	font-weight: 500;
	font-size: 0.72rem;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	margin-top: .15rem;
}

/* Header search (persistent, compact) */
.aipc-headsearch .wp-block-search__inside-wrapper {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	background: var(--aipc-input);
	overflow: hidden;
}
.aipc-headsearch .wp-block-search__input {
	border: 0; background: transparent; padding: .45rem .9rem; font-size: .95rem; min-width: 8rem;
	color: var(--wp--preset--color--contrast);
}
.aipc-headsearch .wp-block-search__button {
	background: transparent; color: var(--wp--preset--color--primary); border: 0;
	margin: 0; padding: 0 .8rem 0 .4rem; font-weight: 600;
}
.aipc-headsearch .wp-block-search__button:hover { color: var(--wp--preset--color--secondary); }

/* Nav links: quiet, underline-grow */
.wp-block-navigation .wp-block-navigation-item__content { text-decoration: none; }
.wp-block-navigation a:hover { text-decoration: underline; text-underline-offset: .25em; }

/* ============================================================
   Search-first hero — teal brand band
   ============================================================ */
.aipc-hero {
	background: var(--wp--preset--color--primary);
	border-radius: 16px;
	color: var(--aipc-band-fg);
	overflow: hidden;
}
.aipc-hero h1, .aipc-hero .aipc-hero__sub { color: var(--aipc-band-fg); }
.aipc-hero .aipc-hero__sub { opacity: .92; }
.aipc-hero__eyebrow {
	font-family: var(--wp--preset--font-family--system);
	font-weight: 600; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase;
	color: var(--aipc-band-fg); opacity: .8;
}
.aipc-hero__meta { color: var(--aipc-band-fg); opacity: .8; }

/* Oversized hero search box */
.aipc-search .wp-block-search__inside-wrapper {
	background: var(--aipc-input);
	border: 2px solid transparent;
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(0,0,0,.16);
	overflow: hidden;
}
.aipc-search .wp-block-search__input {
	border: 0; background: transparent;
	padding: 1rem 1.1rem; font-size: 1.15rem;
	color: var(--wp--preset--color--contrast);
}
.aipc-search .wp-block-search__input::placeholder { color: var(--wp--preset--color--muted); }
.aipc-search .wp-block-search__button {
	background: var(--wp--preset--color--secondary);
	color: #fff; border: 0; margin: 0; border-radius: 0;
	font-weight: 700; padding: 0 1.6rem; font-size: 1.05rem;
}
.aipc-search .wp-block-search__button:hover { background: var(--wp--preset--color--contrast); }

/* ============================================================
   Cost-range cards (signature) + entry cards
   ============================================================ */
.aipc-cards { }
.aipc-card {
	background: var(--aipc-card);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	padding: 1.25rem 1.3rem;
	height: 100%;
	box-shadow: var(--aipc-shadow);
	transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.aipc-card:hover { transform: translateY(-3px); box-shadow: var(--aipc-shadow-hover); border-color: var(--wp--preset--color--primary); }
.aipc-card h3 { margin-top: 0; margin-bottom: .35rem; }
.aipc-card h3 a { text-decoration: none; color: var(--wp--preset--color--contrast); }
.aipc-card h3 a:hover { color: var(--wp--preset--color--primary); }
.aipc-card-accent { background: var(--wp--preset--color--surface); border-left: 5px solid var(--wp--preset--color--secondary); }

/* The signature: bold serif cost range */
.aipc-price {
	font-family: var(--wp--preset--font-family--serif);
	font-weight: 700;
	font-size: 1.7rem;
	line-height: 1.15;
	color: var(--wp--preset--color--primary);
	margin: .1rem 0 .2rem;
}
.aipc-price-label {
	font-family: var(--wp--preset--font-family--system);
	font-size: .8rem; letter-spacing: .03em; text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

/* Latest-guides post cards */
.aipc-postcard {
	background: var(--aipc-card);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	box-shadow: var(--aipc-shadow);
	transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.aipc-postcard:hover { transform: translateY(-3px); box-shadow: var(--aipc-shadow-hover); border-color: var(--wp--preset--color--primary); }
.aipc-postcard .wp-block-post-title a { text-decoration: none; }
.aipc-postcard .wp-block-post-title a:hover { text-decoration: underline; }

/* ============================================================
   Data tables (cost ranges, state coverage)
   ============================================================ */
.wp-block-table { overflow-x: auto; }
.wp-block-table table { border-collapse: collapse; width: 100%; background: var(--aipc-card); }
.wp-block-table th, .wp-block-table td {
	border: 1px solid var(--wp--preset--color--line);
	padding: .7rem .85rem; text-align: left; vertical-align: top;
}
.wp-block-table thead th {
	background: var(--wp--preset--color--surface);
	font-size: .95rem; font-weight: 700;
	position: sticky; top: 0;
}
.wp-block-table tbody tr:nth-child(even) td { background: var(--wp--preset--color--surface); }
/* Numeric / code columns read as values */
.wp-block-table td .mono, .aipc-mono { font-family: var(--wp--preset--font-family--mono); font-variant-numeric: tabular-nums; }

/* ============================================================
   Coverage verdict + yes/no/varies chips (icon + word, never colour alone)
   ============================================================ */
.aipc-chip {
	display: inline-flex; align-items: center; gap: .35em;
	border-radius: 999px; padding: .2em .75em;
	font-size: .9rem; font-weight: 700; line-height: 1.3;
}
.aipc-chip::before { font-weight: 700; }
.aipc-chip-yes { background: var(--aipc-chip-yes-bg); color: var(--aipc-chip-yes-fg); }
.aipc-chip-yes::before { content: "\2713"; }          /* ✓ */
.aipc-chip-no { background: var(--aipc-chip-no-bg); color: var(--aipc-chip-no-fg); }
.aipc-chip-no::before { content: "\2715"; }           /* ✕ */
.aipc-chip-varies { background: var(--aipc-chip-var-bg); color: var(--aipc-chip-var-fg); }
.aipc-chip-varies::before { content: "\2248"; }       /* ≈ */

/* Verdict / answer block — above the fold on entry pages */
.aipc-verdict {
	border: 1px solid var(--wp--preset--color--line);
	border-left: 6px solid var(--wp--preset--color--primary);
	background: var(--wp--preset--color--surface);
	border-radius: 12px;
	padding: 1.2rem 1.4rem;
}
.aipc-verdict.is-covered   { border-left-color: var(--wp--preset--color--covered); }
.aipc-verdict.is-varies    { border-left-color: var(--wp--preset--color--secondary); }
.aipc-verdict.is-notcovered{ border-left-color: var(--wp--preset--color--danger); }
.aipc-verdict__label {
	font-family: var(--wp--preset--font-family--system);
	font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
	color: var(--wp--preset--color--muted); margin: 0 0 .35rem;
}
.aipc-verdict__answer { font-family: var(--wp--preset--font-family--serif); font-size: 1.35rem; font-weight: 700; margin: 0; }

/* ============================================================
   Trust masthead (byline + dates) — every article
   ============================================================ */
.aipc-masthead {
	border-top: 1px solid var(--wp--preset--color--line);
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: .85rem 0;
	margin: .25rem 0 0;
	display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; align-items: center;
	font-size: .95rem; color: var(--wp--preset--color--muted);
}
.aipc-masthead .wp-block-post-date,
.aipc-masthead time { font-family: var(--wp--preset--font-family--mono); color: var(--wp--preset--color--contrast); font-size: .9rem; }
.aipc-masthead strong { color: var(--wp--preset--color--contrast); font-weight: 600; }
.aipc-masthead .aipc-review { display: inline-flex; align-items: center; gap: .4rem; }
.aipc-masthead .aipc-review::before {
	content: "\2713"; color: var(--wp--preset--color--covered); font-weight: 700;
}

/* ============================================================
   Sources — proud, numbered citation list
   ============================================================ */
.aipc-sources {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	padding: 1.3rem 1.5rem;
}
.aipc-sources h2, .aipc-sources h3 { margin-top: 0; }
.aipc-sources ol { margin: .5rem 0 0; padding-left: 1.4rem; }
.aipc-sources li { margin: .5rem 0; font-size: 1rem; line-height: 1.55; }
.aipc-sources li::marker { color: var(--wp--preset--color--primary); font-weight: 700; }
.aipc-sources a { word-break: break-word; }
.aipc-sources .publisher { color: var(--wp--preset--color--muted); }

/* ============================================================
   Safety callout — reserved for genuine hazards
   ============================================================ */
.aipc-safety {
	border: 1px solid var(--wp--preset--color--danger);
	border-left: 6px solid var(--wp--preset--color--danger);
	background: color-mix(in srgb, var(--wp--preset--color--danger) 8%, var(--aipc-card));
	border-radius: 12px;
	padding: 1.1rem 1.3rem;
}
.aipc-safety strong { color: var(--wp--preset--color--danger); }

/* ============================================================
   FAQ — native <details>, no JS
   ============================================================ */
.aipc-faq details {
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: .3rem 0;
}
.aipc-faq details:first-of-type { border-top: 1px solid var(--wp--preset--color--line); }
.aipc-faq summary {
	cursor: pointer; list-style: none; padding: .85rem 2rem .85rem 0; position: relative;
	font-family: var(--wp--preset--font-family--serif); font-weight: 700; font-size: 1.2rem;
}
.aipc-faq summary::-webkit-details-marker { display: none; }
.aipc-faq summary::after {
	content: "+"; position: absolute; right: .2rem; top: .7rem;
	font-size: 1.5rem; font-weight: 400; color: var(--wp--preset--color--primary); transition: transform .15s ease;
}
.aipc-faq details[open] summary::after { content: "\2212"; }
.aipc-faq details > *:not(summary) { margin: 0 0 .9rem; color: var(--wp--preset--color--contrast); }

/* Core details block (generic) */
.wp-block-details {
	border: 1px solid var(--wp--preset--color--line); border-radius: 10px;
	padding: .5rem 1rem; background: var(--aipc-card);
}
.wp-block-details summary { font-weight: 700; cursor: pointer; }

/* ============================================================
   Standing disclaimer strip
   ============================================================ */
.aipc-disclaimer {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 10px;
}
.aipc-disclaimer p { color: var(--wp--preset--color--muted); margin: 0; }

/* ============================================================
   Breadcrumbs
   ============================================================ */
.aipc-crumbs { color: var(--wp--preset--color--muted); font-size: .95rem; }
.aipc-crumbs a { color: var(--wp--preset--color--muted); text-decoration: none; }
.aipc-crumbs a:hover { color: var(--wp--preset--color--primary); text-decoration: underline; }
.aipc-crumbs .sep { padding: 0 .45em; opacity: .6; }

/* ============================================================
   Footer
   ============================================================ */
.aipc-footer a { text-decoration: none; }
.aipc-footer a:hover { text-decoration: underline; }
.aipc-footer__col-title {
	font-family: var(--wp--preset--font-family--system);
	font-weight: 700; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

/* ============================================================
   Content surface panel helper
   ============================================================ */
.aipc-surface {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
	.aipc-card:hover, .aipc-postcard:hover { transform: none; }
}

/* ============================================================
   Mobile
   ============================================================ */
@media (max-width: 600px) {
	.aipc-logo__text { font-size: 1.2rem; }
	.aipc-logo__tag { display: none; }
	.aipc-search .wp-block-search__input { font-size: 1.05rem; }
}

/* ============================================================
   LAYOUT v2 — Encyclopedia-Rail  (marker: aipc-layout-rail)
   ------------------------------------------------------------
   Distinct execution vs the puppypaw pilot: NO A–Z fore-edge
   thumb tabs, NO chip-list shelves. Here the rail is a guide
   table-of-contents, the "shelf" unit is a COST/COVERAGE TABLE,
   a stat band opens the reference, and the entry page carries a
   sticky COST-FACTS rail. Identity (teal/terracotta/serif/sand)
   is unchanged — only the floor plan is new.
   ============================================================ */

/* ---- shared two-zone shells (breakout, self-centered) ---- */
.aipc-home-shell,
.aipc-entry {
	width: 100%;
	max-width: 1180px;
	margin-inline: auto;
	padding-inline: 1.3rem;
	display: grid;
	gap: 2.6rem;
	align-items: start;
	padding-top: var(--wp--preset--spacing--40);
	padding-bottom: var(--wp--preset--spacing--60);
}
.aipc-home-shell { grid-template-columns: 244px minmax(0, 1fr); }   /* rail | content  */
.aipc-entry      { grid-template-columns: minmax(0, 1fr) 316px; }   /* article | rail  */
.aipc-home-shell > *, .aipc-entry > * { min-width: 0; }

/* ---- Guide-index rail (home) — a reference contents ToC ---- */
.aipc-guide-rail { position: sticky; top: 1.4rem; align-self: start; }
.aipc-guide-rail .aipc-railsearch { margin-bottom: 1.35rem; }
.aipc-rail-label {
	font-family: var(--wp--preset--font-family--system);
	font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
	color: var(--wp--preset--color--muted); margin: 0 0 .55rem;
}
.aipc-guide-index { list-style: none; margin: 0 0 1.2rem; padding: 0; }
.aipc-guide-index .grp { margin-bottom: 1.1rem; }
.aipc-guide-index .grp > .t {
	display: block;
	font-family: var(--wp--preset--font-family--serif); font-weight: 700; font-size: 1.02rem;
	color: var(--wp--preset--color--contrast);
	padding-bottom: .32rem; margin-bottom: .35rem;
	border-bottom: 2px solid var(--wp--preset--color--secondary);
}
.aipc-guide-index a {
	display: flex; justify-content: space-between; gap: .5rem; align-items: baseline;
	padding: .34rem .3rem .34rem .55rem;
	color: var(--wp--preset--color--contrast); text-decoration: none;
	border-left: 2px solid transparent; font-size: 1rem; border-radius: 0 6px 6px 0;
}
.aipc-guide-index a:hover {
	color: var(--wp--preset--color--primary);
	border-left-color: var(--wp--preset--color--primary);
	background: var(--wp--preset--color--surface);
}
.aipc-guide-index a .n { font-family: var(--wp--preset--font-family--mono); font-size: .82rem; color: var(--wp--preset--color--muted); }
.aipc-rail-trust {
	display: flex; align-items: center; gap: .45rem; font-size: .86rem;
	color: var(--wp--preset--color--muted);
	border-top: 1px solid var(--wp--preset--color--line); padding-top: .9rem;
}
.aipc-rail-trust::before { content: "\2713"; color: var(--wp--preset--color--covered); font-weight: 700; }

/* ---- Frontispiece + stat band (home) ---- */
.aipc-frontis .aipc-eyebrow {
	font-family: var(--wp--preset--font-family--system);
	font-weight: 700; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
	color: var(--wp--preset--color--secondary); margin: 0 0 .45rem;
}
.aipc-frontis h1 { margin: .1rem 0 .45rem; }
.aipc-frontis .lede { color: var(--wp--preset--color--muted); font-size: 1.25rem; line-height: 1.5; max-width: 54ch; }
.aipc-statband {
	display: flex; flex-wrap: wrap; margin: 1.5rem 0 0;
	border: 1px solid var(--wp--preset--color--line); border-radius: 12px; overflow: hidden;
	background: var(--aipc-card);
}
.aipc-statband > div {
	flex: 1 1 150px; padding: .9rem 1.15rem;
	border-right: 1px solid var(--wp--preset--color--line);
}
.aipc-statband > div:last-child { border-right: 0; }
.aipc-statband .num {
	display: block; font-family: var(--wp--preset--font-family--serif); font-weight: 700;
	font-size: 1.5rem; line-height: 1.1; color: var(--wp--preset--color--primary);
}
.aipc-statband .cap { display: block; font-size: .8rem; color: var(--wp--preset--color--muted); margin-top: .15rem; }

/* ---- Cost-table shelves (home) — the signature unit ---- */
.aipc-shelf { margin-top: 2.5rem; scroll-margin-top: 1rem; }
.aipc-shelf__head { display: flex; align-items: baseline; gap: .8rem; margin-bottom: .95rem; }
.aipc-shelf__head h2 { font-size: var(--wp--preset--font-size--large); margin: 0; white-space: nowrap; }
.aipc-shelf__head .kick { font-family: var(--wp--preset--font-family--mono); font-size: .76rem; color: var(--wp--preset--color--muted); white-space: nowrap; }
.aipc-shelf__head .rule { flex: 1; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--wp--preset--color--secondary), transparent); }
.aipc-shelf__note { font-size: .9rem; color: var(--wp--preset--color--muted); margin: .7rem 0 0; }

/* the ledger: cost + coverage in one table */
.aipc-costtable table { border-collapse: collapse; width: 100%; background: var(--aipc-card); }
.aipc-costtable th, .aipc-costtable td {
	border: 1px solid var(--wp--preset--color--line);
	padding: .7rem .85rem; text-align: left; vertical-align: middle;
}
.aipc-costtable thead th { background: var(--wp--preset--color--surface); font-size: .82rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.aipc-costtable tbody tr:nth-child(even) td { background: var(--wp--preset--color--surface); }
.aipc-costtable .eq { font-weight: 700; color: var(--wp--preset--color--contrast); text-decoration: none; font-size: 1.02rem; }
.aipc-costtable .eq:hover { color: var(--wp--preset--color--primary); }
.aipc-costtable .price { font-family: var(--wp--preset--font-family--serif); font-weight: 700; color: var(--wp--preset--color--primary); font-size: 1.12rem; white-space: nowrap; }
.aipc-costtable td .aipc-chip { font-size: .8rem; padding: .12em .5em; }

/* guide-entry cards shelf */
.aipc-guidegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.aipc-guidecard {
	display: block; background: var(--aipc-card); border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px; padding: 1.1rem 1.15rem; text-decoration: none; box-shadow: var(--aipc-shadow);
	transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.aipc-guidecard:hover { transform: translateY(-3px); box-shadow: var(--aipc-shadow-hover); border-color: var(--wp--preset--color--primary); }
.aipc-guidecard .gt { display: block; font-family: var(--wp--preset--font-family--serif); font-weight: 700; font-size: 1.2rem; color: var(--wp--preset--color--contrast); }
.aipc-guidecard:hover .gt { color: var(--wp--preset--color--primary); }
.aipc-guidecard .gd { display: block; font-size: .9rem; color: var(--wp--preset--color--muted); margin-top: .3rem; }
.aipc-guidecard .go { display: inline-block; margin-top: .55rem; font-size: .85rem; font-weight: 700; color: var(--wp--preset--color--secondary); }

/* coverage CTA shelf */
.aipc-coverage-cta {
	display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; align-items: center; justify-content: space-between;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line); border-left: 5px solid var(--wp--preset--color--secondary);
	border-radius: 12px; padding: 1.3rem 1.5rem;
}
.aipc-coverage-cta .txt { max-width: 60ch; }
.aipc-coverage-cta .txt strong { font-family: var(--wp--preset--font-family--serif); font-size: 1.2rem; display: block; margin-bottom: .2rem; }
.aipc-coverage-cta .txt span { color: var(--wp--preset--color--muted); font-size: .95rem; }
.aipc-coverage-cta .go {
	flex: 0 0 auto; display: inline-block; background: var(--wp--preset--color--primary); color: #fff;
	font-weight: 700; text-decoration: none; padding: .7rem 1.4rem; border-radius: 9px;
}
.aipc-coverage-cta .go:hover { background: var(--wp--preset--color--secondary); }

/* ---- Entry: article + sticky cost-facts rail ---- */
.aipc-entry__main { min-width: 0; }
.aipc-entry__rail { position: sticky; top: 1.4rem; align-self: start; display: flex; flex-direction: column; gap: 1.1rem; }
.aipc-factcard {
	background: var(--aipc-card); border: 1px solid var(--wp--preset--color--line);
	border-radius: 14px; box-shadow: var(--aipc-shadow); overflow: hidden;
}
.aipc-factcard.is-primary { border-top: 4px solid var(--wp--preset--color--primary); }
.aipc-factcard .hd {
	font-family: var(--wp--preset--font-family--system); font-weight: 700; font-size: .72rem;
	letter-spacing: .1em; text-transform: uppercase; color: var(--wp--preset--color--muted);
	padding: .9rem 1.1rem .15rem;
}
.aipc-factcard .bd { padding: .5rem 1.1rem 1.1rem; font-size: .95rem; }
.aipc-factcard .bd > p:first-child { margin-top: 0; }
.aipc-payrow {
	display: flex; justify-content: space-between; gap: .6rem; align-items: center;
	padding: .5rem 0; border-top: 1px solid var(--wp--preset--color--line);
}
.aipc-payrow:first-child { border-top: 0; }
.aipc-payrow .who { font-weight: 600; color: var(--wp--preset--color--contrast); }
.aipc-factnote { font-size: .82rem; color: var(--wp--preset--color--muted); margin: .55rem 0 0; }
.aipc-factcard .wp-block-post-date, .aipc-factcard time {
	font-family: var(--wp--preset--font-family--mono); font-size: 1.05rem; font-weight: 600;
	color: var(--wp--preset--color--contrast);
}
.aipc-srcmini { list-style: none; margin: 0; padding: 0; }
.aipc-srcmini li {
	display: flex; justify-content: space-between; gap: .5rem; align-items: center;
	padding: .38rem 0; border-top: 1px solid var(--wp--preset--color--line); font-size: .9rem;
}
.aipc-srcmini li:first-child { border-top: 0; }
.aipc-srcmini .tag { font-family: var(--wp--preset--font-family--mono); font-size: .7rem; color: var(--wp--preset--color--muted); }
.aipc-railnav { list-style: none; margin: 0; padding: 0; }
.aipc-railnav li { border-top: 1px solid var(--wp--preset--color--line); }
.aipc-railnav li:first-child { border-top: 0; }
.aipc-railnav a { display: block; padding: .5rem 0; text-decoration: none; color: var(--wp--preset--color--contrast); }
.aipc-railnav a:hover { color: var(--wp--preset--color--primary); }

/* ---- Responsive collapse for both shells ---- */
@media (max-width: 999px) {
	.aipc-home-shell { grid-template-columns: 1fr; gap: 1.6rem; }
	.aipc-guide-rail { position: static; }
	.aipc-guide-rail .aipc-guide-index { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.6rem; }
	.aipc-entry { grid-template-columns: 1fr; gap: 1.6rem; }
	.aipc-entry__rail { position: static; flex-direction: row; flex-wrap: wrap; }
	.aipc-entry__rail .aipc-factcard { flex: 1 1 250px; }
}
@media (max-width: 600px) {
	.aipc-guide-rail .aipc-guide-index { grid-template-columns: 1fr; }
	.aipc-statband > div { flex-basis: 45%; }
	.aipc-shelf__head { flex-wrap: wrap; }
	.aipc-shelf__head .rule { display: none; }
}
