:root {
  --max: 1020px;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: rgba(17,24,39,0.10);
  --shadow: 0 8px 24px rgba(17,24,39,0.08);
  --shadow-sm: 0 2px 10px rgba(17,24,39,0.06);
  --radius: 18px;
  --accent: #0b1f3a;
  --accent-2: #1f4f8a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}

/* Prevent long words/URLs from blowing out layouts (e.g., guide titles on hub pages) */
.content, .card, .card *, main, article {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.container { max-width: var(--max); margin: 0 auto; padding: 16px; }
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-weight: 700; text-decoration: none; color: inherit; }
.top-nav { display: flex; gap: 12px; flex-wrap: wrap; }
.top-nav a { text-decoration: none; color: inherit; padding: 6px 8px; border-radius: 8px; }
.top-nav a:hover { background: rgba(17,24,39,0.06); }
.market-nav { border-bottom: 1px solid #eee; margin: 0; padding: 8px 16px; list-style: none; display: flex; gap: 10px; flex-wrap: wrap; }
.market-nav a { text-decoration: none; }
.hero { padding: 24px 0 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.badge { display: inline-block; font-size: 12px; padding: 2px 8px; border: 1px solid #ddd; border-radius: 999px; }
.footer-nav { display: flex; gap: 12px; flex-wrap: wrap; }
.footer-nav a { text-decoration: none; }
.listings { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.listing-card, .sponsor-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.badges { display: flex; gap: 8px; margin-bottom: 8px; }
.badge-verified { }
.badge-sponsored { }
.notice {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(11,31,58,0.04);
}

/* --- Enterprise polish (safe additions) --- */
h1, h2, h3 { line-height: 1.2; margin: 0.4em 0 0.2em; }
p { margin: 0.6em 0; }
a { color: inherit; }
a.button, .button {
  display: inline-block;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
a.button:hover, .button:hover { background: rgba(17,24,39,0.04); }
.button-primary {
  background: var(--accent);
  color: #fff;
  border-color: rgba(255,255,255,0.18);
}
.button-primary:hover { background: var(--accent-2); }
.kicker { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.section { padding: 14px 0; }
.hr { height: 1px; background: #eee; margin: 16px 0; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { border: 1px solid #eee; padding: 10px; vertical-align: top; text-align: left; }
.table th { background: #fafafa; font-weight: 600; }
.sponsor-stack { margin: 12px 0; }
.sponsor-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.price-card { border: 1px solid #eee; border-radius: 16px; padding: 14px; }
.price { font-size: 22px; font-weight: 700; margin-top: 6px; }
.muted { color: var(--muted); }

/* Markets list: multi-column to avoid endless scroll */
.markets-status-list { columns: 2; column-gap: 24px; padding-left: 18px; }
@media (min-width: 900px) { .markets-status-list { columns: 3; } }
.markets-status-list li { break-inside: avoid; padding: 2px 0; }

/* FAQ accordion (closed by default) */
.faq-accordion { display: grid; gap: 10px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 0; overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.faq-item > summary { cursor: pointer; padding: 12px 14px; list-style: none; font-weight: 650; }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item[open] > summary { border-bottom: 1px solid #eee; background: #fafafa; }
.faq-answer { padding: 10px 14px 14px; }

/* ===== Footer (locked markup: <footer> + .footer-meta + .footer-nav) ===== */
footer{
  margin-top: 2.5rem;
  padding: 1.25rem 0;
  background: #0b1f3a;          /* dark blue */
  color: rgba(255,255,255,0.88);
  font-size: 0.85rem;           /* global footer shrink */
  line-height: 1.35;
}

footer p{
  margin: 0.35rem 0;            /* tighten vertical space */
  font-size: 0.82rem;           /* make disclaimer paragraphs smaller */
  color: rgba(255,255,255,0.82);
}

footer .footer-meta{
  margin-top: 0.75rem;
  font-size: 0.78rem;           /* smaller copyright line */
  color: rgba(255,255,255,0.75);
}

footer .footer-nav{
  margin-top: 0.5rem;
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

footer .footer-nav a{
  color: rgba(255,255,255,0.92);
  text-decoration: underline;   /* make them look like links */
  text-underline-offset: 3px;
  font-weight: 600;
  font-size: 0.82rem;
}

footer .footer-nav a:hover{
  color: #ffffff;
}

/* ===== Guides micro-note ("If you only read one thing") ===== */
.callout{
  margin: 0.5rem 0 0.75rem;
  padding: 0;
  border: none;
  background: transparent;
  max-width: 100%;
  opacity: 0.95;
}

.callout strong{
  font-weight: 400;          /* keep it soft */
  font-style: italic;
}

.callout p{
  display: block;            /* allow normal wrapping */
  margin: 0;                 /* avoid default paragraph spacing weirdness */
  font-size: 0.78rem;        /* match “independent educational publisher” */
  font-style: italic;
  color: #6b7280;            /* soft neutral gray */
  line-height: 1.25;

  white-space: normal;       /* allow wrapping */
  overflow-wrap: anywhere;   /* prevents long runs from breaking layout */
  word-break: normal;

}

/* ===== Ad block micro styling (very low visual priority) ===== */
.ad-block,
.advertising,
.ad,
[class*="ad-"]{
  font-size: 0.68rem;          /* ultra subtle */
  line-height: 1.25;
}

.ad-block *,
.advertising *,
.ad *,
[class*="ad-"] *{
  font-weight: 400;            /* remove bold */
  color: #9ca3af;              /* soft gray */
}

/* De-emphasize "Advertise here" */
.ad-block strong,
.advertising strong,
.ad strong{
  font-weight: 400;
  text-transform: none;
}

/* Extra subtle disclosure line */
.ad-block .disclosure,
.ad-block .ad-sub,
.advertising .disclosure{
  font-size: 0.68rem;
  opacity: 0.65;
}
/* ===== Guides hub cards: fix underline + oversized headings ===== */
.card a {
  text-decoration: none;   /* remove default underline in cards */
  display: block;          /* makes the click target cleaner */
}

.card a:hover {
  text-decoration: underline; /* optional: keep hover affordance */
  text-underline-offset: 3px; /* matches footer style */
}

.card h2, .card h3 {
  font-size: 1.05rem;      /* tighten “giant” headings inside cards */
  margin: 0 0 6px;         /* override global heading margins */
}

.card p {
  margin: 0.35em 0 0;      /* reduce card copy spacing */
  font-size: 0.95rem;
  opacity: 0.85;
}
/* ===== Guides hub card polish ===== */
.guide-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}

.guide-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.25;
}

.guide-card p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.35;
  font-weight: 400;
  color: #6b7280; /* lighter */
  font-style: italic; /* optional: makes it feel like “supporting text” */
}

/* Optional: subtle hover affordance */
.guide-card:hover {
  background: #fafafa;
  border-color: #e5e7eb;
}


/* ===== City page interaction + polish (Accordion + CTA + softer background) ===== */
:root{
  --bg-soft: #f6f7f9;
  --panel: #ffffff;
  --border-soft: #e7e9ee;
  --shadow-sm: 0 6px 18px rgba(17,24,39,.08);
  --shadow-md: 0 10px 30px rgba(17,24,39,.10);
}

body{
  background: var(--bg-soft);
}

/* Make main content feel like panels, not endless white */
.section{
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 16px;
}

/* Stronger CTA hierarchy */
.start-here .cta-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.cta-title{ margin:0; font-size: 20px; letter-spacing: -0.01em; }
.cta-sub{ margin: 6px 0 0; color: #4b5563; }

.cta-actions{
  display:flex;
  gap:10px;
  flex-wrap: wrap;
}

a.button.button-primary{
  background:#111827;
  color:#ffffff;
  border-color:#111827;
}
a.button.button-primary:hover{ background:#0b1220; }

a.button.button-secondary{
  background:#ffffff;
  color:#111827;
}

/* Accordion using <details> (no JS required) */
details.accordion{
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  margin: 0 0 12px;
}

details.accordion > summary{
  cursor: pointer;
  padding: 12px 14px;
  list-style: none;
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
  font-size: 18px;
}

/* Chevron indicator (requested UX) */
details.accordion > summary::after{
  content: "▾";
  font-weight: 800;
  color: #6b7280;
  transform: rotate(0deg);
  transition: transform .15s ease;
  font-size: 18px;
}
details.accordion[open] > summary::after{
  transform: rotate(180deg);
}

details.accordion > summary::-webkit-details-marker{ display:none; }

details.accordion[open] > summary{
  border-bottom: 1px solid var(--border-soft);
  background: #fafafa;
}

.accordion-meta{
  font-weight: 500;
  color: #6b7280;
  font-size: 13px;
}

.accordion-panel{
  padding: 12px 14px 14px;
}

/* Make FAQ blocks visually loud (without changing editorial meaning) */
details.accordion#city-faq,
details.accordion#state-faq{
  border-color: rgba(31,79,138,0.35);
  box-shadow: var(--shadow-md);
}

details.accordion#city-faq > summary,
details.accordion#state-faq > summary{
  font-size: 20px;
  padding: 14px 16px;
}

details.accordion#city-faq > summary::after,
details.accordion#state-faq > summary::after{
  font-size: 22px;
}

details.accordion#city-faq .accordion-meta,
details.accordion#state-faq .accordion-meta{
  font-size: 14px;
}

/* FAQ item rows: bigger click target + clearer chevron */
.faq-item > summary{
  position: relative;
  padding-right: 44px;
  font-size: 16px;
}
.faq-item > summary::after{
  content: "▸";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  transition: transform .15s ease;
  font-weight: 800;
  color: #6b7280;
}
.faq-item[open] > summary::after{
  transform: translateY(-50%) rotate(90deg);
}

/* PI directory: align CSS to actual markup + upgrade table density */
.pi-dir-table-wrap{ overflow-x:auto; }
.pi-dir-table,
.pi-directory-table{
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
.pi-dir-table th,
.pi-dir-table td,
.pi-directory-table th,
.pi-directory-table td{
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
}
.pi-dir-table th,
.pi-directory-table th{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #6b7280;
}
.pi-dir-site .mono,
.pi-url{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  color:#374151;
  word-break: break-all;
}

/* Sponsored module (PI city pages) */
.sponsored-placement{
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}
.sponsored-actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top: 10px; }
.sponsor-meta{ margin-top: 10px; font-size: 12px; color:#6b7280; }

/* PI state page: cities list should fit and feel intentional */
.state-cities-list{
  columns: 2;
  column-gap: 24px;
  padding-left: 18px;
}
@media (min-width: 900px){ .state-cities-list{ columns: 3; } }
.state-cities-list li{ break-inside: avoid; padding: 2px 0; }


details.accordion#city-faq > summary::after,
details.accordion#state-faq > summary::after{
  font-size: 22px;
  color: #1f4f8a;
}

/* FAQ items: bigger hit area + clearer chevron */
.faq-item > summary{
  position: relative;
  padding-right: 44px;
}
.faq-item > summary::after{
  content: "▸";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  font-weight: 900;
  font-size: 18px;
  color: #1f4f8a;
  transition: transform .15s ease;
}
.faq-item[open] > summary::after{
  transform: translateY(-50%) rotate(90deg);
}

/* PI directory: fix class mismatch + make it feel enterprise */
.pi-dir-table-wrap,
.pi-directory-table-wrap{
  overflow-x: auto;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: #fff;
}

.pi-dir-table,
.pi-directory-table{
  width: 100%;
  border-collapse: collapse;
}

.pi-dir-table th,
.pi-dir-table td,
.pi-directory-table th,
.pi-directory-table td{
  text-align: left;
  padding: 12px 12px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
  vertical-align: top;
}

.pi-dir-table th,
.pi-directory-table th{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #6b7280;
  background: #fafafa;
}

.pi-dir-name{ font-weight: 650; }
.pi-url, .mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  color:#374151;
  word-break: break-all;
}

/* Sponsored placement module (PI) */
.sponsored-placement{
  border: 1px solid rgba(31,79,138,0.25);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(31,79,138,0.06), rgba(255,255,255,0));
  padding: 14px;
  margin: 10px 0 14px;
}
.sponsored-placement .kicker{ opacity: 0.9; }
.sponsored-actions{ display:flex; gap:10px; flex-wrap: wrap; margin-top: 10px; }
.sponsor-meta{ margin-top: 10px; font-size: 12px; color:#6b7280; }

/* PI primary CTA block */
.pi-primary-cta{
  border: 1px solid rgba(17,24,39,0.12);
  background: #0b1f3a;
  border-radius: 16px;
  padding: 14px;
  margin: 12px 0 16px;
}
.pi-primary-cta a{
  display: block;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.pi-primary-cta a:hover{ text-decoration: underline; }

/* PI state pages: city list should fit + feel structured */
.pi-state-directory{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.pi-state-cities-list{
  columns: 2;
  column-gap: 24px;
  padding-left: 18px;
}
@media (min-width: 900px){ .pi-state-cities-list{ columns: 3; } }
.pi-state-cities-list li{ break-inside: avoid; padding: 3px 0; }

/* Sleeker guide/listing cards (less bloggy) */
.card,
.listing-card,
.sponsor-card{
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.card:hover,
.listing-card:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #d9dde6;
}

/* Tighten guide tile typography */
.city-guides .card h3{ font-size: 15px; }
.city-guides .card p{ font-size: 13px; color:#6b7280; }

/* PI Sponsored + Directory (professional table) */
.pi-sponsored{
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
  background: #fff;
}
.pi-disclosure{
  font-size: 12px; /* smaller than body text */
  color: #6b7280;
  margin: 0 0 10px 0;
}
.pi-sponsored-card{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.pi-sponsored-card h3{
  margin:0 0 6px 0;
  font-size:16px;
}
.pi-sponsored-actions{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width: 220px;
}
.pi-primary-cta{
  margin: 12px 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background:#fafafa;
}
.pi-primary-cta .btn{
  display:inline-block;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #111827;
  background:#111827;
  color:#fff;
  text-decoration:none;
  font-weight:700;
}
.pi-directory-table{
  width:100%;
  border-collapse: collapse;
  margin-top: 10px;
}
.pi-directory-table th,
.pi-directory-table td{
  text-align:left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
}
.pi-directory-table th{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color:#6b7280;
}
.pi-url{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  color:#374151;
  word-break: break-all;
}
.pi-other-listings details > summary{
  cursor:pointer;
  user-select:none;
}
.pi-arrow{
  display:inline-block;
  margin-left:8px;
  transform: translateY(1px);
  font-size: 12px;
  color:#6b7280;
}


/* =========================
   UX Overhaul v1 (no data/validator changes)
   - Deeper hierarchy + softer surface
   - PI states hub: 5x10 grid on /states/
   - Directory tables: enterprise polish
   - FAQ: visually dominant + default open (handled in base.html)
   ========================= */

:root{
  --surface: #ffffff;
  --surface-2: #f7f8fb;
  --border: #e6e8ef;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 10px 24px rgba(15,23,42,.08);
}

body{
  background: var(--surface-2);
}

main{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

/* Headings: stronger hierarchy */
h1{ letter-spacing:-0.02em; }
h2{ margin-top: 32px; padding-top: 8px; border-top: 1px solid var(--border); }
h3{ margin-top: 20px; }

/* Card/tile depth */
.card, .tile{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover, .tile:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* PI States hub grid: 5 columns desktop, responsive collapse */
.state-grid{
  display:grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 1100px){
  .state-grid{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px){
  .state-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 650px){
  .state-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Directory tables: cleaner, aligned, scannable */
main table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
main table thead th{
  background: #f2f4f8;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
main table tbody td{
  padding: 12px 14px;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
main table tbody tr:nth-child(even){
  background: #fafbfe;
}
main table tbody tr:hover{
  background: #f3f6ff;
}

/* Make any “listings directory” blocks look less like a Word doc */
main ul, main ol{
  padding-left: 22px;
}

/* FAQ: loud, obvious, and easy to scan */
.faq, #faq, [data-zone="faq"], [data-section="faq"], .faq-block{
  margin-top: 28px;
  padding: 18px 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fbfcff;
  box-shadow: var(--shadow-md);
}
.faq h2, #faq h2, .faq-block h2{
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.faq details, #faq details, .faq-block details{
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  margin: 10px 0;
  overflow: hidden;
}
.faq summary, #faq summary, .faq-block summary{
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-size: 1.05rem;
  font-weight: 750;
  display:flex;
  align-items:center;
  justify-content: space-between;
}
.faq summary::-webkit-details-marker,
#faq summary::-webkit-details-marker,
.faq-block summary::-webkit-details-marker{
  display:none;
}
.faq summary::after, #faq summary::after, .faq-block summary::after{
  content: "▾";
  font-size: 1.35rem;
  line-height: 1;
  opacity: .85;
  transform: translateY(-1px);
  transition: transform .12s ease;
}
.faq details[open] summary::after,
#faq details[open] summary::after,
.faq-block details[open] summary::after{
  transform: rotate(180deg);
}
.faq details > *:not(summary),
#faq details > *:not(summary),
.faq-block details > *:not(summary){
  padding: 0 16px 14px 16px;
  color: #1f2937;
}
