/* =============================================================================
   programmatic.css — paper/ink content styles for programmatic pages
   Loaded AFTER main.css ONLY on programmatic pages (city, statute/legal,
   problem-scenario, process/comparison). Re-themes the shared content
   vocabulary (hero, section, steps, alerts, tables, CTA) to the paper/ink
   design system. Chrome (nav/footer) comes from main.css + the partials.
   ============================================================================= */

/* Breadcrumb */
.breadcrumb { background: var(--paper-2); border-bottom: 1px solid var(--line); padding: 11px 0; font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); letter-spacing: 0.02em; }
.breadcrumb .wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.breadcrumb a { color: var(--brand); }
.breadcrumb a:hover { text-decoration: underline; text-underline-offset: 2px; }
.breadcrumb span { color: var(--ink-4); }
.breadcrumb strong { color: var(--ink-2); font-weight: 600; }

/* Hero — paper, left-aligned, editorial */
.hero { background: var(--paper); color: var(--ink); padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 44px); text-align: left; border-bottom: 1px solid var(--line); position: relative; overflow: visible; }
.hero h1 { font-family: var(--font-display); font-size: clamp(30px, 5vw, 52px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.04; margin: 0 0 16px; text-wrap: balance; color: var(--ink); }
.hero h1 em { color: var(--brand); font-style: normal; }
.hero .lead { font-size: clamp(16px, 1.4vw, 18.5px); color: var(--ink-2); max-width: 64ch; margin: 0 0 22px; line-height: 1.6; text-wrap: pretty; }
.hero .lead strong { color: var(--brand-dark); font-weight: 600; }
.hero .cta { display: inline-flex; align-items: center; gap: 9px; background: var(--brand); color: var(--brand-text); padding: 13px 24px; border-radius: 999px; font-weight: 500; font-size: 15px; border: 1px solid var(--brand); transition: background-color 120ms ease; }
.hero .cta:hover { background: var(--brand-dark); color: #fff; }
.hero .tag { display: inline-flex; align-items: center; gap: 8px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.04em; color: var(--ink-2); margin-bottom: 16px; }

/* Section blocks */
.section { padding: clamp(36px, 5vw, 60px) 0; background: var(--paper); }
.section:nth-of-type(even) { background: var(--paper-2); }
.section h2 { font-family: var(--font-display); font-size: clamp(22px, 3vw, 32px); font-weight: 600; letter-spacing: -0.022em; color: var(--ink); margin: 0 0 16px; line-height: 1.1; }
.section h3 { font-family: var(--font-display); font-size: clamp(17px, 1.8vw, 21px); font-weight: 600; letter-spacing: -0.012em; color: var(--ink); margin: 22px 0 8px; }
.section p { color: var(--ink-2); font-size: 16px; line-height: 1.7; margin: 0 0 15px; max-width: 70ch; }
.section ul, .section ol { color: var(--ink-2); font-size: 16px; line-height: 1.7; padding-left: 22px; margin: 0 0 15px; max-width: 70ch; }
.section li { margin-bottom: 7px; }
.section li::marker { color: var(--brand); }
.section a { color: var(--brand); text-decoration: underline; text-decoration-color: var(--brand-soft); text-underline-offset: 3px; }
.section a:hover { text-decoration-color: var(--brand); }

/* Stat row */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0; }
@media (max-width: 560px) { .stat-row { grid-template-columns: 1fr; } }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px; text-align: center; }
.section:nth-of-type(even) .stat { background: var(--paper); }
.stat .v { font-family: var(--font-display); font-size: clamp(26px, 3.4vw, 36px); font-weight: 600; letter-spacing: -0.025em; color: var(--brand); display: block; line-height: 1; }
.stat .l { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .12em; display: block; margin-top: 8px; }

/* Step list */
.steps { list-style: none; padding: 0; margin: 22px 0; counter-reset: step; }
.steps li { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--line); counter-increment: step; }
.steps li:last-child { border-bottom: none; }
.step-num { flex-shrink: 0; width: 34px; height: 34px; background: var(--brand); color: var(--brand-text); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.step-body strong { display: block; font-size: 15.5px; font-weight: 600; margin-bottom: 4px; color: var(--ink); }
.step-body span { font-size: 14.5px; color: var(--ink-3); line-height: 1.5; }

/* Numbered ol with circle counters */
.numbered { list-style: none; padding-left: 0; counter-reset: s; }
.numbered li { counter-increment: s; margin-bottom: 18px; padding-left: 50px; position: relative; }
.numbered li::before { content: counter(s); position: absolute; left: 0; top: -2px; background: var(--brand); color: var(--brand-text); width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.numbered li strong { color: var(--ink); font-weight: 600; }

/* Competitors block */
.competitors { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin: 22px 0; }
.competitors h3 { font-family: var(--font-display); font-size: 16px; color: var(--ink); margin: 0 0 10px; font-weight: 600; }
.competitors ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; font-size: 14.5px; color: var(--ink-2); }
@media (max-width: 560px) { .competitors ul { grid-template-columns: 1fr; } }
.competitors li { padding-left: 18px; position: relative; margin: 0; }
.competitors li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }
.competitors .note { font-size: 13px; color: var(--ink-3); font-style: italic; margin-top: 12px; }

/* Cross-link callout */
.cross-link { background: #FBF1E0; border: 1px solid #E8C887; border-left: 4px solid var(--warn); border-radius: var(--radius-sm); padding: 16px 20px; margin: 22px 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.6; }
.cross-link a { color: var(--brand-dark); text-decoration: underline; font-weight: 600; }
.cross-link strong { color: var(--ink); }

/* Info / alert blocks */
.alert { padding: 16px 20px; border-radius: var(--radius-sm); margin: 22px 0; font-size: 15px; line-height: 1.6; border: 1px solid; }
.alert .label { font-family: var(--font-mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 5px; }
.alert.blue { background: var(--brand-soft); border-color: color-mix(in oklab, var(--brand) 30%, transparent); color: var(--brand-dark); border-left: 4px solid var(--brand); }
.alert.amber { background: #FBF1E0; border-color: #E8C887; color: #7a4a0e; border-left: 4px solid var(--warn); }
.alert.red { background: #F6E4DF; border-color: #DCA99D; color: #7a2418; border-left: 4px solid var(--bad); }
.alert.green { background: #E8F1E6; border-color: #B8D2B0; color: #245a2c; border-left: 4px solid var(--ok); }

/* FAQ list (simple cards) */
.faq-list { margin-top: 22px; }
.faq-item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 12px; }
.faq-item h3 { font-family: var(--font-display); font-size: 16.5px; font-weight: 600; color: var(--ink); margin: 0 0 7px; letter-spacing: -0.01em; }
.faq-item p { font-size: 15px; color: var(--ink-2); margin: 0; line-height: 1.6; }

/* Data table */
.data-table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 14.5px; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.data-table thead tr { background: var(--paper-2); text-align: left; }
.data-table th, .data-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.data-table th { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 500; color: var(--ink-3); }
.data-table td { color: var(--ink-2); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody td:first-child { font-weight: 600; color: var(--ink); }

/* Resource list closer */
.resource-list { list-style: none; padding: 0; margin: 0; }
.resource-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.resource-list li:last-child { border-bottom: none; }
.resource-list a { color: var(--brand); text-decoration: none; font-weight: 500; font-size: 15.5px; }
.resource-list a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* CTA strip — dark ink panel */
.cta-strip { background: var(--ink); color: var(--paper); padding: clamp(40px, 6vw, 64px) 0; text-align: center; position: relative; overflow: hidden; }
.cta-strip::before { content: ""; position: absolute; right: -100px; top: -100px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, var(--brand-glow), transparent 60%); }
.cta-strip .wrap { position: relative; z-index: 1; }
.cta-strip h2 { font-family: var(--font-display); font-size: clamp(24px, 3.4vw, 38px); font-weight: 600; letter-spacing: -0.025em; margin: 0 0 12px; color: var(--paper); line-height: 1.08; }
.cta-strip p { color: rgba(247,245,240,0.78); margin: 0 auto 22px; max-width: 58ch; font-size: 16px; line-height: 1.6; }
.cta-strip a { display: inline-flex; align-items: center; gap: 8px; background: var(--brand); color: var(--brand-text); padding: 13px 26px; border-radius: 999px; font-weight: 500; text-decoration: none; margin: 6px; border: 1px solid var(--brand); transition: background-color 120ms ease; }
.cta-strip a:hover { background: var(--brand-dark); color: #fff; }
.cta-strip a.alt { background: transparent; border: 1px solid rgba(247,245,240,0.3); color: var(--paper); }
.cta-strip a.alt:hover { background: rgba(247,245,240,0.08); border-color: rgba(247,245,240,0.5); }

/* Related links footer */
.related-pages { padding: clamp(32px, 4vw, 48px) 0; background: var(--paper-2); border-top: 1px solid var(--line); }
.related-pages h2 { font-family: var(--font-display); font-size: clamp(18px, 2vw, 24px); font-weight: 600; letter-spacing: -0.018em; color: var(--ink); margin: 0 0 16px; }
.related-pages ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.related-pages a { display: block; padding: 12px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: var(--brand); font-size: 14.5px; font-weight: 500; transition: border-color 120ms ease, background-color 120ms ease; }
.related-pages a:hover { border-color: var(--brand); background: #fff; }

/* ============================================================================
   Hero with topic illustration (added v2). Opt-in via .hero.has-figure on the
   <section>: the hero text is wrapped in <div class="hero-copy"> and a sibling
   <figure class="hero-figure"> holds the illustration. .wrap becomes a 2-column
   grid; stacks on mobile. .hero-figure visuals come from main.css.
   ============================================================================ */
.hero.has-figure .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.hero.has-figure .hero-copy { min-width: 0; }
.hero.has-figure .hero-copy > * { max-width: 64ch; }
.hero.has-figure .hero-figure { margin: 0; width: 100%; }
.hero.has-figure .hero-figure img,
.hero.has-figure .hero-figure svg { display: block; width: 100%; height: auto; }
@media (max-width: 860px) {
  .hero.has-figure .wrap { grid-template-columns: 1fr; gap: 24px; }
  .hero.has-figure .hero-figure { max-width: 460px; }
}
