/* ============================================================================
   Directory (category × parish) SEO landing pages.
   Shared by directory_index.html + directory_category.html.
   Design language mirrors report.html (same tokens) for visual consistency.
   ============================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0D1A12; --bg-card: #131F17; --bg-raise: #1A2B1F; --border: #1F3028;
  --green: #22c55e; --gold: #F9A825; --red: #ef4444;
  --text: #E8EDE9; --text-2: #aab3b1; --subtle: #6B8F74; --muted: #7F8E83;
  --font-d: 'Syne', sans-serif;
  --font-m: 'DM Mono', monospace;
  --font-b: 'Outfit', sans-serif;
}
body { background: var(--bg); color: var(--text); font-family: var(--font-b); min-height: 100vh; line-height: 1.55; }
a { color: inherit; }

nav { display: flex; align-items: center; justify-content: space-between; padding: 0 32px; height: 60px; border-bottom: 1px solid var(--border); }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-badge { width: 32px; height: 32px; background: var(--gold); border-radius: 7px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; color: #081A0E; font-family: var(--font-d); }
.logo-name { font-family: var(--font-d); font-weight: 700; font-size: 17px; }
.nav-actions { display: flex; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; border-radius: 8px; font-size: 14px; font-weight: 600; border: none; cursor: pointer; text-decoration: none; transition: all .15s; }
.btn-ghost   { background: transparent; color: var(--subtle); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--subtle); }
.btn-primary { background: var(--green); color: #081A0E; }
.btn-primary:hover { background: #16a34a; }

.wrap { max-width: 980px; margin: 0 auto; padding: 56px 24px 80px; }
.crumbs { font-family: var(--font-m); font-size: 11.5px; letter-spacing: 0.08em; color: var(--subtle); margin-bottom: 18px; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--green); }
.crumbs .sep { margin: 0 7px; opacity: .5; }

.eyebrow { font-family: var(--font-m); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--green); margin-bottom: 14px; }
h1 { font-family: var(--font-d); font-size: clamp(32px, 4.2vw, 48px); line-height: 1.06; letter-spacing: -.02em; margin-bottom: 14px; }
h1 em { font-style: italic; color: var(--gold); font-weight: 800; }
.lede { color: var(--text-2); font-size: 16px; max-width: 660px; line-height: 1.6; margin-bottom: 38px; }

.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 44px; }
.stat { padding: 18px 18px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 11px; }
.stat-l { font-family: var(--font-m); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2); margin-bottom: 8px; }
.stat-v { font-family: var(--font-d); font-size: 28px; font-weight: 800; color: var(--text); letter-spacing: -.01em; }
.stat-v.warn { color: var(--red); }
.stat-v .u { font-family: var(--font-m); font-size: 14px; color: var(--subtle); margin-left: 3px; font-weight: 400; }

h2 { font-family: var(--font-d); font-size: 24px; font-weight: 700; margin: 44px 0 8px; padding-top: 28px; border-top: 1px solid var(--border); }
h2:first-of-type { border-top: none; padding-top: 0; }
.sub-h { color: var(--muted); font-size: 13.5px; margin-bottom: 20px; line-height: 1.55; }

/* Parish ranking / breakdown table */
.rank-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: 11px; overflow: hidden; }
.rank-table th, .rank-table td { padding: 12px 16px; font-size: 13.5px; text-align: left; border-bottom: 1px solid var(--border); }
.rank-table th { font-family: var(--font-m); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); background: rgba(34,197,94,.04); }
.rank-table td.r { text-align: right; font-family: var(--font-m); }
.rank-table tr:last-child td { border-bottom: none; }
.rank-table tr:hover { background: rgba(255,255,255,.02); }
.rank-table tr.you { background: rgba(249,168,37,.06); }
.rank-num { color: var(--subtle); width: 32px; }
.rank-name a { color: var(--text); text-decoration: none; font-weight: 500; }
.rank-name a:hover { color: var(--green); }
.rank-gap { display: inline-block; min-width: 55px; padding: 2px 8px; border-radius: 4px; font-family: var(--font-m); font-size: 12px; }
.rank-gap.hi { color: var(--red);   background: rgba(239,68,68,.10); border: 1px solid rgba(239,68,68,.30); }
.rank-gap.md { color: var(--gold);  background: rgba(249,168,37,.10); border: 1px solid rgba(249,168,37,.30); }
.rank-gap.lo { color: var(--green); background: rgba(34,197,94,.10); border: 1px solid rgba(34,197,94,.30); }

/* Masked sample opportunity cards */
.opp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.opp-card { padding: 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; }
.opp-name { font-family: var(--font-d); font-size: 16px; font-weight: 700; letter-spacing: 0.5px; color: var(--text); }
.opp-meta { color: var(--text-2); font-size: 12.5px; margin: 4px 0 8px; }
.opp-score { font-family: var(--font-d); font-size: 22px; font-weight: 800; color: var(--gold); }
.opp-score .u { color: var(--subtle); font-size: 11px; margin-left: 2px; }
.opp-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 12px; color: var(--subtle); }
.locked { font-family: var(--font-m); font-size: 11px; color: var(--subtle); }

/* Category / parish chip mesh (internal linking) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 8px; background: var(--bg-card); border: 1px solid var(--border); text-decoration: none; font-size: 13px; color: var(--text); transition: all .15s; }
.chip:hover { border-color: var(--green); color: var(--green); }
.chip .c { font-family: var(--font-m); font-size: 11.5px; color: var(--subtle); }
.chip:hover .c { color: var(--green); }

/* Hub category grid */
.dir-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.dir-card { display: block; padding: 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; text-decoration: none; transition: border-color .15s, transform .15s; }
.dir-card:hover { border-color: var(--green); transform: translateY(-2px); }
.dir-card .dc-name { font-family: var(--font-d); font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.dir-card .dc-blurb { font-size: 13px; color: var(--text-2); line-height: 1.5; margin-bottom: 14px; }
.dir-card .dc-stats { display: flex; gap: 16px; font-family: var(--font-m); font-size: 12px; }
.dir-card .dc-stats .n { color: var(--gold); font-weight: 600; }
.dir-card .dc-stats .l { color: var(--subtle); }

/* CTA */
.cta { margin-top: 50px; padding: 28px 30px; background: linear-gradient(180deg, rgba(34,197,94,.08), rgba(34,197,94,.02)); border: 1px solid rgba(34,197,94,.40); border-radius: 14px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.cta-text h3 { font-family: var(--font-d); font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.cta-text p { color: var(--text-2); font-size: 14px; line-height: 1.6; }

.methodology { margin-top: 38px; padding: 20px 24px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; color: var(--text-2); font-size: 13px; line-height: 1.65; }
.methodology strong { color: var(--text); }

footer { text-align: center; color: var(--subtle); font-size: 12.5px; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--border); }
footer a { color: var(--subtle); }

@media (max-width: 860px) { .dir-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .hero-stats { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  nav { padding: 0 16px; }
  .nav-actions .btn-ghost { display: none; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .rank-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .opp-grid { grid-template-columns: 1fr; }
  .dir-grid { grid-template-columns: 1fr; }
  .cta { flex-direction: column; align-items: stretch; text-align: center; }
  .cta .btn { width: 100%; min-height: 44px; justify-content: center; }
}
