/* Jurisio public pages (tools, forms, templates, statutes, cases).
   Loaded after styles.css + site-chrome.css; reuses the site chrome palette (cream paper,
   moss, Newsreader + Geist). Namespaced so the shared chrome is never restyled. */
:root {
  --pp-paper: var(--site-paper, #fdf8ef);
  --pp-card: #fffdf8;
  --pp-ink: var(--site-ink, #16241f);
  --pp-ink-2: #3d4944;
  --pp-mute: #5f6558;
  --pp-line: #e6dfd0;
  --pp-line-2: #d6ccb8;
  --pp-moss: var(--site-moss, #4a641f);
  --pp-moss-hover: var(--site-moss-hover, #3b5119);
  --pp-moss-tint: #eef1e2;
  --pp-on-moss: var(--site-on-moss, #f8f0e4);
  --pp-ochre: #8a5a14;
  --pp-ochre-tint: #f7ecd6;
  --pp-danger: #9b2c1f;
  --pp-danger-tint: #fbebe7;
  --pp-band: #221b12;
  --pp-display: var(--site-display, "Newsreader", Georgia, serif);
  --pp-sans: var(--site-sans, "Geist", ui-sans-serif, system-ui, sans-serif);
  --pp-mono: var(--font-mono, "Geist Mono", ui-monospace, monospace);
  --pp-radius: 18px;
  --pp-shadow: 0 1px 2px rgba(34, 27, 18, .05), 0 12px 32px -12px rgba(34, 27, 18, .16);
  --pp-shadow-lg: 0 2px 4px rgba(34, 27, 18, .05), 0 28px 60px -24px rgba(34, 27, 18, .28);
  --pp-ease: cubic-bezier(.2, .7, .3, 1);
}

/* ── Page frame ──────────────────────────────────────────────────────── */
.public-page {
  position: relative; z-index: 1;
  max-width: 860px; margin: 0 auto;
  padding: calc(var(--site-header-h, 62px) + 40px) 24px 64px;
  color: var(--pp-ink); font-family: var(--pp-sans); font-size: 16px; line-height: 1.6;
}
.public-page--hub, .public-page--catalog { max-width: 1160px; }
.public-page--tool, .public-page--detail { max-width: 1000px; }
.public-page h1, .public-page h2, .public-page h3 { font-family: var(--pp-display); font-weight: 500; color: var(--pp-ink); }
.public-page h1 { margin: .2em 0 .35em; font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.08; letter-spacing: -.02em; }
.public-page h2 { margin: 2.2rem 0 .8rem; font-size: clamp(1.45rem, 2.6vw, 1.85rem); line-height: 1.2; letter-spacing: -.01em; }
.public-page h3 { margin: 1.6rem 0 .5rem; font-size: 1.2rem; line-height: 1.3; }
.public-page p, .public-page li { line-height: 1.7; }
/* Source tables preserve row/column relationships and scroll within the statute
   text region on phones, without widening the page. The region is keyboard focusable. */
.public-page .statute-text[data-source-body] { max-width: 100%; overflow-x: auto; }
.public-page .statute-text[data-source-body] table { width: max-content; min-width: 100%; border-collapse: collapse; }
.public-page .statute-text[data-source-body] :is(th, td) { padding: .4rem .6rem; border: 1px solid var(--pp-line-2); max-width: 24rem; vertical-align: top; }
.public-page .statute-text[data-source-body] th { text-align: left; }
.public-page .statute-text[data-source-body] img { max-width: 100%; height: auto; }
.public-page a { color: var(--pp-moss); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.public-page a:hover { color: var(--pp-moss-hover); text-decoration-thickness: 2px; }
.public-page :focus-visible { outline: 3px solid var(--pp-moss); outline-offset: 3px; border-radius: 6px; }
.public-page .pp-icon { flex: none; width: 1.25em; height: 1.25em; }

.public-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.25rem; padding: 0; list-style: none; font-size: .85rem; color: var(--pp-mute); }
.public-breadcrumbs li + li::before { content: "/"; padding-right: .5rem; color: var(--pp-line-2); }
.public-breadcrumbs a { color: var(--pp-mute); text-decoration: none; }
.public-breadcrumbs a:hover { color: var(--pp-ink); text-decoration: underline; }
.public-breadcrumbs li:last-child a { color: var(--pp-ink); }

.public-disclaimer {
  position: relative; z-index: 1;
  max-width: 860px; margin: 0 auto 8px; padding: 18px 24px;
  font: .85rem/1.6 var(--pp-sans); color: var(--pp-mute); text-align: center;
}
.public-disclaimer::before { content: ""; display: block; width: 48px; height: 1px; margin: 0 auto 14px; background: var(--pp-line-2); }

.public-status { border: 1px solid #e3c98f; background: var(--pp-ochre-tint); color: #5b3c0c; border-radius: 12px; padding: 14px 16px; margin: 20px 0; font-size: .95rem; }
.public-status[hidden] { display: none; }

/* ── Page header (breadcrumb, h1, one-sentence lede) ─────────────────── */
.public-head { margin: 0 0 40px; }
.public-head h1 { margin-top: 0; }
.public-lede { max-width: 42rem; margin: 0; font-size: clamp(1.02rem, 1.6vw, 1.12rem); line-height: 1.6; color: var(--pp-ink-2); }
.public-page--hub .public-head { margin-bottom: 48px; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.public-page .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border: 1px solid var(--pp-line-2); border-radius: 10px;
  background: var(--pp-card); color: var(--pp-ink);
  font: 600 15px/1.2 var(--pp-sans); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 160ms var(--pp-ease), border-color 160ms var(--pp-ease);
}
.public-page .btn .pp-icon { width: 18px; height: 18px; }
.public-page .btn:hover { border-color: var(--pp-ink-2); color: var(--pp-ink); text-decoration: none; }
.public-page .btn:active { transform: translateY(1px); }
.public-page .btn:disabled { cursor: not-allowed; opacity: .5; transform: none; }
.public-page .btn--primary { border-color: var(--pp-moss); background: var(--pp-moss); color: var(--pp-on-moss); }
.public-page .btn--primary:hover { border-color: var(--pp-moss-hover); background: var(--pp-moss-hover); color: var(--pp-on-moss); }
.public-page .btn--primary:disabled:hover { background: var(--pp-moss); }
.public-page .btn--ghost { background: transparent; }
.public-page .btn--ghost:hover { background: rgba(34, 27, 18, .04); }
.public-page .btn--sm { min-height: 40px; padding: 8px 14px; font-size: 14px; border-radius: 8px; }
.public-page a.button { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px; border-radius: 10px; background: var(--pp-moss); color: var(--pp-on-moss); font-weight: 600; text-decoration: none; }
.public-page a.button:hover { background: var(--pp-moss-hover); color: var(--pp-on-moss); }

/* ── Hub ─────────────────────────────────────────────────────────────── */
.public-section { margin: 0 0 56px; }
.public-page .public-section > h2 { margin: 0 0 24px; padding-top: 20px; border-top: 1px solid var(--pp-line-2); font-size: 1.35rem; }
.hub-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); gap: 40px 48px; margin: 0; padding: 0; list-style: none; }
.hub-tool { position: relative; }
.public-page .hub-tool h3 { margin: 16px 0 4px; font-size: 1.3rem; }
.public-page .hub-tool h3 a { color: var(--pp-ink); text-decoration: none; }
.public-page .hub-tool h3 a::after { content: ""; position: absolute; inset: 0; }
.public-page .hub-tool:hover h3 a { color: var(--pp-moss); text-decoration: underline; }
.public-page .hub-tool h3 a:focus-visible { outline: none; }
.hub-tool:focus-within { outline: 3px solid var(--pp-moss); outline-offset: 6px; border-radius: 6px; }
.hub-tool p { margin: 0; color: var(--pp-mute); line-height: 1.55; }

/* A small working example of each tool. Decorative; the description says what it does. */
.hub-sample {
  display: flex; flex-direction: column; justify-content: center; gap: 8px; min-height: 112px;
  padding: 18px 22px; border: 1px solid var(--pp-line); border-radius: 10px; background: var(--pp-card);
  font: 15px/1.4 var(--pp-mono); color: var(--pp-ink); overflow-wrap: anywhere;
}
.hub-sample--citation-formatter { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 6px 14px; }
.sample-before { color: var(--pp-mute); }
.sample-arrow { color: var(--pp-mute); font-family: var(--pp-sans); }
.sample-after { font-weight: 600; }
.sample-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.sample-mark { font: 500 .8rem/1.4 var(--pp-sans); color: var(--pp-mute); white-space: nowrap; }
.sample-mark::before { content: "–"; display: inline-block; width: 1.1em; }
.sample-mark--found { color: var(--pp-moss); }
.sample-mark--found::before { content: "✓"; }
.hub-sample--redact-pdf, .hub-sample--fill-pdf { font-family: var(--pp-sans); }
.sample-bar { display: inline-block; width: 9.5ch; height: 1.05em; margin-left: 4px; vertical-align: -.15em; background: var(--pp-ink); }
.sample-line + .sample-line { color: var(--pp-mute); }
.sample-label { font-size: .8rem; color: var(--pp-mute); }
.sample-field { display: flex; align-items: center; min-height: 38px; padding: 6px 12px; border: 1px solid var(--pp-line-2); border-radius: 6px; background: #fff; }
.sample-caret { display: inline-block; width: 1.5px; height: 1.1em; margin-left: 2px; background: var(--pp-moss); }

/* Plain link lists: forms and templates on the hub, "More free tools" on tool pages. */
.link-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 0 40px; margin: 0; padding: 0; list-style: none; }
.link-list > li { padding: 14px 0 16px; border-top: 1px solid var(--pp-line); }
.public-page .link-list a { font: 500 1.12rem/1.35 var(--pp-display); color: var(--pp-ink); text-decoration: none; }
.public-page .link-list a:hover { color: var(--pp-moss); text-decoration: underline; }
.link-list p { margin: 4px 0 0; color: var(--pp-mute); font-size: .92rem; line-height: 1.5; }
.public-page--hub .link-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); gap: 20px 48px; }
.public-page--hub .link-list > li { padding: 0; border-top: 0; }
.hub-ella { margin: 0; padding-top: 20px; border-top: 1px solid var(--pp-line-2); color: var(--pp-ink-2); }
.public-page .hub-ella a { font-weight: 600; }

/* ── Tool card and controls (the one genuinely separate object) ──────── */
.tool-card {
  margin: 0 0 48px; padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--pp-line-2); border-radius: 14px; background: var(--pp-card);
  box-shadow: 0 1px 2px rgba(34, 27, 18, .04);
}
.tool-card > noscript { display: block; margin-top: 12px; color: var(--pp-mute); }
.tool-field label { display: block; margin-bottom: 4px; font-weight: 600; font-size: 1rem; }
.tool-help { margin: 0 0 12px; font-size: .9rem; line-height: 1.55; color: var(--pp-mute); }
.tool-card textarea {
  display: block; width: 100%; min-height: 200px; padding: 14px 16px;
  border: 1px solid var(--pp-line-2); border-radius: 10px; background: #fff; color: var(--pp-ink);
  font: 15px/1.6 var(--pp-mono); resize: vertical;
  transition: border-color 160ms var(--pp-ease), box-shadow 160ms var(--pp-ease);
}
.tool-card textarea::placeholder { color: #8f8a7c; }
.tool-card textarea:hover { border-color: #bfb39a; }
.public-page .tool-card textarea:focus-visible, .tool-card textarea:focus { outline: none; border-color: var(--pp-moss); box-shadow: 0 0 0 3px rgba(74, 100, 31, .22); }
.tool-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 16px; }
.tool-counter { margin: 0 0 0 auto; font: 500 .8rem/1.4 var(--pp-mono); color: var(--pp-mute); font-variant-numeric: tabular-nums; }
.tool-status {
  margin: 16px 0 0; padding: 12px 14px 12px 40px; border-radius: 10px; position: relative;
  background: var(--pp-moss-tint); color: #33461a; font-size: .95rem; line-height: 1.5; overflow-wrap: anywhere;
}
.tool-status::before {
  content: ""; position: absolute; left: 15px; top: 17px; width: 10px; height: 10px; border-radius: 50%; background: var(--pp-moss);
}
/* Keep the live region in the accessibility tree while empty; hide only its chrome. */
.tool-status:empty { margin: 0; padding: 0; background: none; }
.tool-status:empty::before { content: none; }
.tool-instructions { display: flex; gap: 10px; margin: 16px 0 0; color: var(--pp-ink-2); font-size: .9rem; line-height: 1.55; }
.tool-instructions .pp-icon { width: 18px; height: 18px; margin-top: 2px; color: var(--pp-mute); }

/* Dropzone: the real input covers the zone; the zone shows the state. */
.tool-drop {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 36px 20px; border: 1.5px dashed var(--pp-line-2); border-radius: 12px; background: #fdfaf3;
  text-align: center; transition: border-color 160ms var(--pp-ease), background-color 160ms var(--pp-ease);
}
.tool-drop label { font: 500 1.2rem/1.3 var(--pp-display); color: var(--pp-ink); }
.tool-drop input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.tool-drop input[type=file]:disabled { cursor: progress; }
.tool-drop-icon { display: grid; place-items: center; color: var(--pp-moss); }
.tool-drop-icon .pp-icon { width: 28px; height: 28px; }
.tool-drop-button { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border: 1px solid var(--pp-line-2); border-radius: 8px; background: var(--pp-card); font-weight: 600; font-size: .9rem; }
.tool-drop:hover, .tool-drop.is-dragover { border-color: var(--pp-moss); background: var(--pp-moss-tint); }
.tool-drop:hover .tool-drop-button { border-color: var(--pp-moss); color: var(--pp-moss); }
.tool-drop:focus-within { outline: 3px solid var(--pp-moss); outline-offset: 3px; }
.tool-drop + .tool-help { margin: 10px 0 0; text-align: center; }

.tool-workspace { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--pp-line); min-width: 0; }
.tool-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px;
  padding: 6px; border: 1px solid var(--pp-line); border-radius: 10px; background: #f8f3e9;
}
.tool-page-label { min-width: 7rem; padding: 0 4px; text-align: center; font-size: .9rem; font-weight: 600; color: var(--pp-ink-2); font-variant-numeric: tabular-nums; }
.tool-stage {
  display: flex; justify-content: center; margin-top: 14px; padding: clamp(10px, 3vw, 28px);
  border-radius: 10px; background: #ebe4d5; overflow: auto;
}
.tool-stage canvas { display: block; max-width: 100%; height: auto; background: #fff; box-shadow: 0 1px 4px rgba(34, 27, 18, .16); }
.tool-check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: .95rem; cursor: pointer; }
.tool-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--pp-moss); }
.tool-form-title { margin: 16px 0 0; font: 500 1.15rem/1.35 var(--pp-display); overflow-wrap: anywhere; }
.tool-form-source { margin: 6px 0 0; }
.tool-form-title:empty, .tool-form-source:empty { display: none; }

/* Once a PDF is open, the dropzone collapses into a slim "choose another" bar. */
.tool-card:has(.tool-workspace:not([hidden])) .tool-drop { flex-direction: row; justify-content: center; gap: 14px; padding: 12px 16px; background: #fbf7ef; }
.tool-card:has(.tool-workspace:not([hidden])) .tool-drop-icon .pp-icon { width: 20px; height: 20px; }
.tool-card:has(.tool-workspace:not([hidden])) .tool-drop label { font-size: 1.05rem; }

/* Result lists shared by the citation formatter and checker */
.public-page .citation-results { display: grid; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; counter-reset: cite; }
.public-page .citation-results:empty { display: none; }
.citation-results > li {
  counter-increment: cite; position: relative; padding: 14px 16px 14px 52px;
  border: 1px solid var(--pp-line); border-radius: 10px; background: #fff; overflow-wrap: anywhere;
}
.citation-results > li::before {
  content: counter(cite); position: absolute; left: 16px; top: 15px;
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px;
  background: #f3eee3; color: var(--pp-mute); font: 600 .75rem/1 var(--pp-mono);
}
.citation-results p { margin: 0 0 6px; font-size: .9rem; line-height: 1.5; color: var(--pp-mute); }
.public-page .citation-results .citation-output { margin: 0 0 8px; font: 500 1.08rem/1.45 var(--pp-display); color: var(--pp-ink); }

/* ── Notes, disclosures, FAQ, handoff, more tools ───────────────────── */
.public-note { margin: 0 0 40px; }
.public-note > p, .public-disclosure-body > * { max-width: 46rem; }
.public-page .public-note > h2 { margin: 0 0 .5rem; font-size: 1.3rem; }
.public-note > p { margin: 0; color: var(--pp-ink-2); }
.public-page .public-note-summary { margin: 0 0 12px; color: var(--pp-ink-2); }
.public-disclosure { border-top: 1px solid var(--pp-line-2); border-bottom: 1px solid var(--pp-line-2); }
.public-disclosure > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 52px; padding: 12px 4px; cursor: pointer; list-style: none;
}
.public-disclosure > summary::-webkit-details-marker { display: none; }
.public-disclosure > summary { font-weight: 500; color: var(--pp-ink); }
.public-disclosure > summary:hover { color: var(--pp-moss); }
.public-disclosure > summary::after, .public-faq-item summary::after {
  content: ""; flex: none; width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--pp-line-2);
  background: linear-gradient(var(--pp-ink-2), var(--pp-ink-2)) center / 10px 1.5px no-repeat,
              linear-gradient(var(--pp-ink-2), var(--pp-ink-2)) center / 1.5px 10px no-repeat;
  transition: transform 200ms var(--pp-ease);
}
.public-disclosure[open] > summary::after, .public-faq-item[open] summary::after { transform: rotate(45deg); }
.public-disclosure-body { padding: 0 4px 12px; color: var(--pp-ink-2); }
.public-disclosure-body > p, .public-disclosure-body > ul { margin: 0 0 .8rem; }
.public-disclosure-body ul { padding-left: 1.2rem; }
.public-disclosure-body li { margin: .3rem 0; }
.public-checklist { margin: .8rem 0; padding-left: 1.4rem; }
.public-checklist li { margin: .35rem 0; padding-left: .25rem; }
.public-checklist li::marker { color: var(--pp-mute); font-variant-numeric: tabular-nums; }

.public-faq { margin: 0 0 40px; }
.public-page .public-faq h2 { margin-top: 0; font-size: 1.3rem; }
.public-faq-item { border-top: 1px solid var(--pp-line); }
.public-faq-item:last-child { border-bottom: 1px solid var(--pp-line); }
.public-faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 52px; padding: 12px 4px; cursor: pointer; list-style: none;
  font: 500 1.08rem/1.35 var(--pp-display); color: var(--pp-ink);
}
.public-faq-item summary::-webkit-details-marker { display: none; }
.public-faq-item summary:hover { color: var(--pp-moss); }
.public-faq-answer { padding: 0 44px 14px 4px; color: var(--pp-ink-2); }
.public-faq-answer p { margin: 0 0 .6rem; }

.public-handoff, .statute-handoff, .case-handoff, .template-handoff { margin: 0 0 40px; color: var(--pp-ink-2); overflow-wrap: anywhere; }
.public-handoff p { margin: 0; }
.public-handoff a, .statute-handoff a, .case-handoff a, .template-handoff a { font-weight: 600; }
.public-credits { margin: 0 0 40px; font-size: .85rem; color: var(--pp-mute); }
.public-credits a { color: var(--pp-mute); }

.public-more { margin: 8px 0 0; }
.public-page .public-more h2 { margin: 0 0 16px; font-size: 1.3rem; }
.public-more-all { margin: 16px 0 0; font-weight: 600; }

/* ── Catalog pages (forms, templates) ────────────────────────────────── */
.catalog-group { margin: 0 0 40px; }
.catalog-group-head { display: flex; flex-direction: column; gap: 0; margin-bottom: 4px; }
.public-page .catalog-group-head .catalog-issuer { margin: 0; font: 500 .85rem/1.4 var(--pp-sans); color: var(--pp-mute); }
.public-page .catalog-group-head .catalog-category { margin: 0 0 8px; font: 500 1.35rem/1.25 var(--pp-display); color: var(--pp-ink); }
.catalog-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 0 40px; margin: 0; padding: 0; list-style: none; }
.catalog-list > li { padding: 11px 0; border-top: 1px solid var(--pp-line); }
.public-page .catalog-list a { color: var(--pp-ink); line-height: 1.45; text-decoration: none; overflow-wrap: anywhere; }
.public-page .catalog-list a:hover { color: var(--pp-moss); text-decoration: underline; }

.template-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 0 40px; margin: 0; padding: 0; list-style: none; }
.template-catalog > li { padding: 16px 0 18px; border-top: 1px solid var(--pp-line-2); }
.public-page .template-catalog a { color: var(--pp-ink); font: 500 1.25rem/1.3 var(--pp-display); text-decoration: none; }
.public-page .template-catalog a:hover { color: var(--pp-moss); text-decoration: underline; }
.template-catalog p { margin: 6px 0 0; color: var(--pp-mute); line-height: 1.55; }

.form-card { margin: 0 0 40px; padding: clamp(20px, 4vw, 28px); border: 1px solid var(--pp-line-2); border-radius: 14px; background: var(--pp-card); }
.form-meta { display: flex; flex-wrap: wrap; margin: 0 0 18px; padding: 0; list-style: none; color: var(--pp-mute); font-size: .92rem; }
.form-meta li + li::before { content: "·"; padding: 0 .5em; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.form-note { margin: 16px 0 0; color: var(--pp-mute); font-size: .92rem; }
.form-card [data-form-status] { margin: 16px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--pp-ochre-tint); color: #5b3c0c; }
.form-card [data-form-status][hidden] { display: none; }
.public-page p[role="note"] { padding: 12px 14px; border-radius: 10px; background: var(--pp-danger-tint); color: var(--pp-danger); }

/* ── Long-form reading (statutes, cases, templates) ──────────────────── */
.public-page article, .statute-text, .opinion-text { line-height: 1.8; overflow-wrap: anywhere; white-space: pre-wrap; }
.statute-text { font-family: var(--pp-display); font-size: 1.12rem; white-space: normal; }
.statute-text p { margin: 1rem 0; }
.statute-meta, .statute-history { font-size: .95rem; line-height: 1.6; color: var(--pp-mute); }
.statute-neighbors { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin: 2rem 0; }
.statute-text p.sub-2 { margin-left: 1.5rem; }
.template-attribution { margin: 2rem 0; padding: 0 0 0 16px; border-left: 2px solid var(--pp-line-2); color: var(--pp-ink-2); font-size: .92rem; overflow-wrap: anywhere; }
.template-attribution p { margin: .3rem 0; }
.template-text { margin: 0 0 40px; padding: clamp(20px, 5vw, 56px); border: 1px solid var(--pp-line); border-radius: 10px; background: #fff; font-family: var(--pp-display); font-size: 1.08rem; line-height: 1.8; overflow-wrap: anywhere; }
.template-text p, .template-text li { margin: .8rem 0; }
.template-text ul, .template-text ol { padding-left: 2rem; }
.template-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; }
.opinion-text { font-family: var(--pp-display); font-size: 1.1rem; }
.case-meta { margin: .3rem 0; color: var(--pp-mute); font-size: .95rem; line-height: 1.55; }
.case-citations { display: flex; flex-wrap: wrap; margin: .6rem 0; padding: 0; list-style: none; color: var(--pp-ink-2); font-size: .95rem; font-variant-numeric: tabular-nums; }
.case-citations:empty { display: none; }
.case-citations li + li::before { content: "·"; padding: 0 .5em; color: var(--pp-mute); }
.case-meta + .opinion-text, .case-citations + .opinion-text { margin-top: 1.75rem; padding-top: .5rem; border-top: 1px solid var(--pp-line); }
.opinion-text p { margin: 1.25rem 0; }

/* ── Phones ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .public-page { padding: calc(var(--site-header-h, 60px) + 20px) 16px 48px; }
  .public-disclaimer { padding: 16px; }
  .public-head { margin-bottom: 28px; }
  .public-page--hub .public-head { margin-bottom: 36px; }
  .hub-tools { gap: 32px; }
  .tool-actions > .btn, .form-actions > .btn, .template-actions > .btn { width: 100%; }
  .tool-counter { margin-left: 0; }
  .public-faq-answer { padding-right: 4px; }
  .tool-drop { padding: 28px 16px; }
  .tool-card { padding: 18px 16px; }
  /* Pager: the page label gets its own row so long labels ("Verified output — Page 12 of 200") never squeeze the buttons. */
  .tool-toolbar { gap: 6px; padding: 6px; }
  .tool-toolbar .btn--sm { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 8px 10px; font-size: 13px; }
  .tool-page-label { order: -1; flex: 1 0 100%; min-width: 0; padding: 4px 0 2px; font-size: .85rem; overflow-wrap: anywhere; }
  .tool-card:has(.tool-workspace:not([hidden])) .tool-drop-button { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .public-page *, .public-page *::before, .public-page *::after { transition: none !important; }
}
