/* PNG Law Explained — stylesheet. Palette: shades of blue, from deep navy chrome
   through a primary mid-blue for actions to a pale blue for panels. */

:root {
  --blue: #14539a;
  --blue-deep: #0e3c73;
  --blue-mid: #0f6a9e;
  --ink: #0f1c2e;
  --ink-soft: #33455c;
  --muted: #5b6b7f;
  --line: #d9e2ec;
  --bg: #f7fafd;
  --panel: #ffffff;
  --panel-2: #eef3f9;
  --focus: #1d6fd8;
  --shadow: 0 1px 2px rgba(20,20,25,.06), 0 8px 24px rgba(20,20,25,.05);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --blue: #6fb3f2;
    --blue-deep: #a8d4fa;
    --blue-mid: #7fc4ec;
    --ink: #e8eef6;
    --ink-soft: #b8c7d9;
    --muted: #8b9db4;
    --line: #26374a;
    --bg: #0d1520;
    --panel: #131f2e;
    --panel-2: #182636;
    --focus: #8ec2ff;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; }

a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-deep); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- Header ---------- */

.topbar {
  background: #0f1c2e;
  color: #eef4fb;
  font-size: 13.5px;
  letter-spacing: .02em;
}
.topbar .wrap {
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  min-height: 38px; padding-top: 6px; padding-bottom: 6px;
}
.topbar p { margin: 0; color: #b9c9dc; }
.topbar strong { color: #7fc4ec; }

.site-header {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-header .wrap {
  display: flex; align-items: center; gap: 18px;
  min-height: 74px; flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; margin-right: auto; }
.brand .mark {
  width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: 8px;
  background: linear-gradient(140deg, #2b7cc4 0 50%, #0f1c2e 50% 100%);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 14px; letter-spacing: .5px;
  font-family: var(--sans);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.brand .name { font-family: var(--serif); font-size: 21px; font-weight: 700; line-height: 1.15; }
.brand .tag { display: block; font-family: var(--sans); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

.nav-toggle {
  display: none; background: var(--panel-2); border: 1px solid var(--line);
  color: var(--ink); font: inherit; font-size: 14px; font-weight: 600;
  padding: 9px 14px; border-radius: 8px; cursor: pointer;
}

.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a {
  display: block; padding: 9px 12px; border-radius: 7px;
  text-decoration: none; color: var(--ink-soft);
  font-size: 15px; font-weight: 600;
}
.site-nav a:hover { background: var(--panel-2); color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--blue); box-shadow: inset 0 -2px 0 var(--blue); border-radius: 7px 7px 0 0; }

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; padding-bottom: 14px; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { padding: 12px 10px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--blue); }
}

/* ---------- Hero ---------- */

.hero {
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(20,83,154,.12), transparent 60%),
    radial-gradient(700px 400px at 95% 0%, rgba(15,106,158,.15), transparent 60%),
    var(--panel-2);
  border-bottom: 1px solid var(--line);
  padding: 62px 0 54px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(2.1rem, 5.2vw, 3.3rem);
  line-height: 1.12; margin: 0 0 16px; letter-spacing: -.015em;
  max-width: 17ch;
}
.hero .lede { font-size: clamp(1.05rem, 2.2vw, 1.22rem); color: var(--ink-soft); max-width: 58ch; margin: 0 0 26px; }

.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--blue); margin: 0 0 14px;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 8px;
  font-weight: 650; font-size: 15.5px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--panel); color: var(--ink); }

@media (prefers-color-scheme: dark) {
  .btn-primary { color: #0f1c2e; }
  .btn-primary:hover { color: #0f1c2e; }
}

/* ---------- Sections ---------- */

section { padding: 56px 0; }
section.tight { padding: 40px 0; }

.section-head { margin-bottom: 28px; max-width: 62ch; }
.section-head h2 {
  font-family: var(--serif); font-size: clamp(1.5rem, 3.2vw, 2rem);
  margin: 0 0 8px; line-height: 1.2; letter-spacing: -.01em;
}
.section-head p { margin: 0; color: var(--muted); }

.bg-alt { background: var(--panel-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Cards ---------- */

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 22px 20px;
  box-shadow: var(--shadow); text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 8px;
}
a.card { transition: transform .15s ease, border-color .15s ease; }
a.card:hover { border-color: var(--blue); transform: translateY(-2px); }
.card h3 { font-family: var(--serif); font-size: 1.2rem; margin: 0; line-height: 1.25; }
.card p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }
.card .kicker {
  font-size: 11.5px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--blue-mid);
}
.card .more { margin-top: auto; padding-top: 10px; font-weight: 650; font-size: 14.5px; color: var(--blue); }

/* ---------- Article ---------- */

.page-head {
  background: var(--panel-2); border-bottom: 1px solid var(--line);
  padding: 40px 0 34px;
}
.page-head h1 {
  font-family: var(--serif); font-size: clamp(1.9rem, 4.4vw, 2.65rem);
  margin: 0 0 12px; line-height: 1.15; letter-spacing: -.015em; max-width: 20ch;
}
.page-head .lede { margin: 0; color: var(--ink-soft); font-size: 1.1rem; max-width: 62ch; }

.crumbs { font-size: 13.5px; color: var(--muted); margin: 0 0 14px; }
.crumbs a { color: var(--muted); }
.crumbs span { padding: 0 6px; }

.layout { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 48px; align-items: start; }
@media (max-width: 940px) { .layout { grid-template-columns: 1fr; gap: 32px; } }

.prose { max-width: 72ch; }
.prose h2 {
  font-family: var(--serif); font-size: 1.5rem; margin: 44px 0 12px;
  line-height: 1.25; scroll-margin-top: 96px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.13rem; margin: 28px 0 8px; line-height: 1.3; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--blue); }

.toc {
  position: sticky; top: 96px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; font-size: 14.5px;
}
.toc h2 { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; font-family: var(--sans); }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin-bottom: 7px; line-height: 1.4; }
.toc a { text-decoration: none; color: var(--ink-soft); }
.toc a:hover { color: var(--blue); text-decoration: underline; }
@media (max-width: 940px) { .toc { position: static; } }

/* ---------- Callouts ---------- */

.note, .warn, .key {
  border-radius: var(--radius); padding: 16px 18px;
  margin: 22px 0; border: 1px solid var(--line);
  background: var(--panel);
}
.note { border-left: 4px solid var(--focus); }
.warn { border-left: 4px solid var(--blue); }
.key  { border-left: 4px solid var(--blue-mid); background: var(--panel-2); }
.note p:last-child, .warn p:last-child, .key p:last-child, .key ul:last-child, .note ul:last-child, .warn ul:last-child { margin-bottom: 0; }
.note .label, .warn .label, .key .label {
  display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; margin-bottom: 6px;
}
.note .label { color: var(--focus); }
.warn .label { color: var(--blue); }
.key .label  { color: var(--blue-mid); }

.pidgin {
  font-style: italic; color: var(--muted);
  border-left: 3px solid var(--line); padding-left: 12px; margin: 0 0 16px;
  font-size: 15.5px;
}

/* ---------- Tables ---------- */

.table-scroll { overflow-x: auto; margin: 0 0 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 480px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--panel-2); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
tr:last-child td { border-bottom: 0; }

/* ---------- Court ladder ---------- */

.ladder { list-style: none; margin: 0 0 22px; padding: 0; }
.ladder li {
  background: var(--panel); border: 1px solid var(--line);
  border-left: 4px solid var(--blue); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 10px;
}
.ladder li b { display: block; font-family: var(--serif); font-size: 1.1rem; margin-bottom: 4px; }
.ladder li span { color: var(--ink-soft); font-size: 15px; }

/* ---------- Search / filter ---------- */

.finder { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.finder input[type="search"] {
  flex: 1 1 260px; min-width: 0;
  padding: 12px 14px; font: inherit; font-size: 15.5px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--ink);
}
.chip {
  padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink-soft);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
@media (prefers-color-scheme: dark) { .chip[aria-pressed="true"] { color: #0f1c2e; } }
.empty-msg { color: var(--muted); font-style: italic; padding: 20px 0; }

/* ---------- Q&A / details ---------- */

.qa { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); margin-bottom: 10px; }
.qa summary {
  cursor: pointer; padding: 16px 18px; font-weight: 650; font-size: 16px;
  list-style: none; display: flex; justify-content: space-between; gap: 14px; align-items: flex-start;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; color: var(--blue); font-size: 22px; line-height: 1; font-weight: 400; }
.qa[open] summary::after { content: "\2212"; }
.qa .qa-body { padding: 0 18px 16px; color: var(--ink-soft); }
.qa .qa-body p:last-child { margin-bottom: 0; }

/* ---------- Glossary ---------- */

.gloss { list-style: none; margin: 0; padding: 0; }
.gloss li { border-bottom: 1px solid var(--line); padding: 16px 0; }
.gloss b { font-family: var(--serif); font-size: 1.08rem; display: block; }
.gloss .tp { font-size: 13.5px; color: var(--blue-mid); font-weight: 650; }
.gloss p { margin: 6px 0 0; color: var(--ink-soft); font-size: 15.5px; }

/* ---------- Footer ---------- */

.site-footer {
  background: #0f1c2e; color: #b9c9dc;
  padding: 48px 0 28px; margin-top: 8px; font-size: 15px;
}
.site-footer a { color: #eaf2fb; text-decoration: none; }
.site-footer a:hover { color: #7fc4ec; text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 30px; }
.site-footer h2 { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #7fc4ec; margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.foot-bottom {
  border-top: 1px solid #24374d; margin-top: 34px; padding-top: 20px;
  font-size: 13.5px; color: #7f92a8;
}
.foot-bottom p { margin: 0 0 8px; max-width: 84ch; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

@media print {
  .site-header, .site-nav, .topbar, .toc, .site-footer, .finder { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
}

/* ---------- Section navigation (added: 9 content sections) ---------- */

.topbar .util { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; }
.topbar .util a { color: #dfe3ea; text-decoration: none; font-weight: 600; }
.topbar .util a:hover { color: #7fc4ec; text-decoration: underline; }
@media (max-width: 700px) { .topbar .util { display: none; } }

.site-nav a { font-size: 14.5px; padding: 9px 10px; }

.section-strip {
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.section-strip ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 10px 0; }
.section-strip a { text-decoration: none; color: var(--ink-soft); padding: 6px 10px; border-radius: 6px; font-weight: 600; }
.section-strip a:hover { background: var(--panel); color: var(--blue); }

/* ---------- Article listing within a section ---------- */

.article-list { list-style: none; margin: 0; padding: 0; }
.article-list li {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.article-list li:first-child { border-top: 1px solid var(--line); }
.article-list h3 { font-family: var(--serif); font-size: 1.25rem; margin: 0 0 6px; line-height: 1.3; }
.article-list h3 a { text-decoration: none; color: var(--ink); }
.article-list h3 a:hover { color: var(--blue); text-decoration: underline; }
.article-list p { margin: 0 0 8px; color: var(--ink-soft); font-size: 15.5px; max-width: 70ch; }
.meta { font-size: 13px; color: var(--muted); letter-spacing: .02em; }
.meta .dot { padding: 0 7px; }

.badge {
  display: inline-block; font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; vertical-align: 2px;
}
.badge-new { background: var(--blue); color: #fff; }
.badge-soon { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { .badge-new { color: #0f1c2e; } }

.series-intro { max-width: 70ch; margin-bottom: 30px; }
.series-intro p { color: var(--ink-soft); }

/* ---------- Standing legal disclaimer band ---------- */

.disclaimer-band {
  background: var(--panel);
  border-top: 3px solid var(--blue);
  border-bottom: 1px solid var(--line);
  padding: 34px 0;
}
.disclaimer-band p { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--ink-soft); max-width: 92ch; }
.disclaimer-band p:last-child { margin-bottom: 0; }
.disclaimer-band strong { color: var(--blue); letter-spacing: .01em; }

/* Masthead: brand on its own row, section nav beneath (wide screens) */
@media (min-width: 881px) {
  .site-header .wrap { min-height: 0; padding-top: 16px; padding-bottom: 0; align-items: center; }
  .site-nav { flex-basis: 100%; border-top: 1px solid var(--line); margin-top: 14px; }
  .site-nav ul { gap: 2px; }
  .site-nav a { padding: 13px 11px; border-radius: 6px 6px 0 0; }
}

/* ---------- Search widget ---------- */

.site-search {
  position: relative; display: flex; align-items: center; gap: 0;
  flex: 0 1 340px; min-width: 0;
}
.site-search .search-icon {
  position: absolute; left: 12px; width: 18px; height: 18px;
  color: var(--muted); pointer-events: none;
}
.site-search input[type="search"] {
  flex: 1 1 auto; min-width: 0;
  padding: 11px 12px 11px 38px;
  font: inherit; font-size: 15px;
  border: 1px solid var(--line); border-right: 0;
  border-radius: 8px 0 0 8px;
  background: var(--panel); color: var(--ink);
  -webkit-appearance: none; appearance: none;
}
.site-search input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
.site-search input[type="search"]:focus { outline: none; border-color: var(--blue); }
.site-search:focus-within input[type="search"] { border-color: var(--blue); }
.site-search button {
  padding: 11px 16px; font: inherit; font-size: 14.5px; font-weight: 650;
  border: 1px solid var(--blue); background: var(--blue); color: #fff;
  border-radius: 0 8px 8px 0; cursor: pointer; white-space: nowrap;
}
.site-search button:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
@media (prefers-color-scheme: dark) { .site-search button { color: #0f1c2e; } }

.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 80;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  max-height: 62vh; overflow-y: auto; padding: 6px;
}
.search-results a {
  display: block; padding: 10px 12px; border-radius: 7px;
  text-decoration: none; color: var(--ink);
}
.search-results a:hover, .search-results a.active { background: var(--panel-2); }
.search-results a b { display: block; font-size: 15px; font-weight: 650; line-height: 1.3; }
.search-results a small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.search-results a em { font-style: normal; background: rgba(20,83,154,.14); border-radius: 2px; padding: 0 2px; }
@media (prefers-color-scheme: dark) { .search-results a em { background: rgba(111,179,242,.22); } }
.search-results .sr-none { padding: 14px 12px; color: var(--muted); font-size: 14.5px; margin: 0; }
.search-results .sr-all {
  display: block; border-top: 1px solid var(--line); margin-top: 4px;
  font-size: 13.5px; font-weight: 650; color: var(--blue);
}

@media (max-width: 880px) {
  .site-search { order: 3; flex: 1 1 100%; margin-top: 4px; }
  .site-header .wrap { padding-bottom: 12px; }
}

/* Full search results page */
.search-page .site-search { display: none; }
.result-list { list-style: none; margin: 0; padding: 0; }
.result-list li { padding: 20px 0; border-bottom: 1px solid var(--line); }
.result-list li:first-child { border-top: 1px solid var(--line); }
.result-list h3 { font-family: var(--serif); font-size: 1.2rem; margin: 0 0 4px; }
.result-list h3 a { text-decoration: none; color: var(--ink); }
.result-list h3 a:hover { color: var(--blue); text-decoration: underline; }
.result-list p { margin: 6px 0 0; color: var(--ink-soft); font-size: 15.5px; max-width: 70ch; }
.result-list em { font-style: normal; background: rgba(20,83,154,.14); border-radius: 2px; padding: 0 2px; }
@media (prefers-color-scheme: dark) { .result-list em { background: rgba(111,179,242,.22); } }

.big-search { display: flex; gap: 0; max-width: 560px; margin-bottom: 8px; }
.big-search input {
  flex: 1 1 auto; min-width: 0; padding: 14px 16px; font: inherit; font-size: 16px;
  border: 1px solid var(--line); border-right: 0; border-radius: 8px 0 0 8px;
  background: var(--panel); color: var(--ink);
}
.big-search input:focus { outline: none; border-color: var(--blue); }
.big-search button {
  padding: 14px 22px; font: inherit; font-size: 15.5px; font-weight: 650;
  border: 1px solid var(--blue); background: var(--blue); color: #fff;
  border-radius: 0 8px 8px 0; cursor: pointer;
}
@media (prefers-color-scheme: dark) { .big-search button { color: #0f1c2e; } }

/* =========================================================
   Mobile and small-screen behaviour
   ========================================================= */

/* Never let a long word, URL or citation push the page sideways. */
body { overflow-wrap: break-word; }
.prose a, .search-results a { overflow-wrap: anywhere; }
.table-scroll { -webkit-overflow-scrolling: touch; }

/* Utility links live in the top bar on desktop; on a phone the top bar
   hides them, so they are repeated inside the collapsible menu. */
.site-nav .nav-util { display: none; }

@media (max-width: 880px) {

  /* The masthead is tall on a phone. Left sticky it would cover a quarter
     of the screen the whole time you are reading, so it scrolls away. */
  .site-header { position: static; }
  .site-header .wrap {
    min-height: 0;
    padding-top: 12px; padding-bottom: 12px;
    gap: 12px;
  }

  .brand .mark { width: 36px; height: 36px; flex-basis: 36px; font-size: 13px; }
  .brand .name { font-size: 19px; }

  /* Comfortable touch targets throughout the header */
  .nav-toggle { min-height: 44px; padding: 10px 16px; font-size: 15px; }
  .site-nav a { display: flex; align-items: center; min-height: 44px; }

  /* 16px is the threshold below which iOS Safari zooms the page in when
     a field is focused. Anything smaller makes the site jump on tap. */
  .site-search input[type="search"] { font-size: 16px; padding-top: 12px; padding-bottom: 12px; }
  .site-search button { min-height: 46px; padding: 12px 16px; }

  .site-nav .nav-util {
    display: block; list-style: none;
    margin: 12px 0 0; padding: 12px 0 0;
    border-top: 2px solid var(--line);
  }
  .nav-util li { margin: 0; }
  .nav-util a {
    display: flex; align-items: center; min-height: 44px;
    padding: 10px; text-decoration: none;
    font-size: 15px; font-weight: 600; color: var(--muted);
  }
  .nav-util a:hover { color: var(--blue); }

  .search-results { max-height: 50vh; }
}

@media (max-width: 620px) {

  body { font-size: 16.5px; }
  .wrap { padding-left: 16px; padding-right: 16px; }

  .topbar { font-size: 12.5px; }
  .topbar .wrap { padding-top: 8px; padding-bottom: 8px; }

  /* Tighter vertical rhythm - desktop spacing wastes a phone screen */
  .hero { padding: 40px 0 36px; }
  .hero h1 { max-width: none; }
  .hero .lede { margin-bottom: 22px; }
  section { padding: 40px 0; }
  section.tight { padding: 30px 0; }
  .page-head { padding: 28px 0 24px; }
  .page-head h1 { max-width: none; }
  .section-head { margin-bottom: 22px; }
  .layout { gap: 28px; }

  /* Stacked, full-width buttons are easier to hit and read */
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn { text-align: center; padding: 14px 20px; }

  .grid { gap: 14px; }
  .card { padding: 20px 18px 18px; }

  .big-search { flex-direction: column; }
  .big-search input { border-right: 1px solid var(--line); border-radius: 8px; font-size: 16px; }
  .big-search button { border-radius: 8px; margin-top: 10px; }

  /* Tables still scroll sideways in their own box, but need less room */
  table { min-width: 380px; font-size: 14.5px; }
  th, td { padding: 10px 12px; }

  .prose h2 { font-size: 1.32rem; margin-top: 34px; }
  .prose h3 { font-size: 1.06rem; }
  .prose ul, .prose ol { padding-left: 20px; }

  .note, .warn, .key { padding: 14px 15px; margin: 18px 0; }
  .ladder li { padding: 14px 15px; }

  .qa summary { padding: 14px 15px; font-size: 15.5px; }
  .qa .qa-body { padding: 0 15px 14px; }

  .article-list li { padding: 18px 0; }
  .article-list h3 { font-size: 1.14rem; }
  .gloss li { padding: 14px 0; }

  /* Give stacked link lists room so neighbouring links are not mis-tapped */
  .toc { padding: 16px 18px; }
  .toc li { margin-bottom: 2px; }
  .toc a { display: block; padding: 7px 0; }

  .disclaimer-band { padding: 26px 0; }
  .site-footer { padding: 36px 0 24px; }
  .foot-grid { gap: 24px; }
  .site-footer li { margin-bottom: 2px; }
  .site-footer li a { display: inline-block; padding: 7px 0; }
  .foot-bottom { margin-top: 26px; }
}

@media (max-width: 400px) {
  .brand .tag { font-size: 10.5px; letter-spacing: .08em; }
  .site-search button { padding: 12px 13px; font-size: 14px; }
  .card h3 { font-size: 1.12rem; }
}

/* ---------- Contact form ---------- */

.contact-form { margin: 24px 0 8px; max-width: 620px; }
.contact-form .field { margin-bottom: 20px; }
.contact-form label {
  display: block; font-weight: 650; font-size: 15px;
  margin-bottom: 6px; color: var(--ink);
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
  width: 100%; padding: 12px 14px;
  font: inherit; font-size: 16px;
  color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); border-radius: 8px;
  -webkit-appearance: none; appearance: none;
}
.contact-form select {
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 20px) 51%, calc(100% - 14px) 51%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}
.contact-form textarea { resize: vertical; min-height: 140px; line-height: 1.55; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(20,83,154,.15);
}
@media (prefers-color-scheme: dark) {
  .contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
    box-shadow: 0 0 0 3px rgba(111,179,242,.22);
  }
}
.contact-form .hint { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }

.contact-form .checkbox { display: flex; gap: 12px; align-items: flex-start; }
.contact-form .checkbox input {
  width: 20px; height: 20px; flex: 0 0 20px; margin-top: 3px;
  accent-color: var(--blue);
}
.contact-form .checkbox label { font-weight: 400; font-size: 14.5px; color: var(--ink-soft); margin: 0; }

/* Spam trap - hidden from people, left in the DOM for bots */
.contact-form .honeypot {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden;
}

.contact-form button { margin-top: 4px; }

@media (max-width: 620px) {
  .contact-form button { width: 100%; }
}

/* ---------- Block quotations (statutory text, court dicta) ---------- */

.prose blockquote {
  margin: 22px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--blue-mid);
  background: var(--panel-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 15.5px;
  color: var(--ink-soft);
}
.prose blockquote p { margin: 0 0 12px; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose blockquote strong { color: var(--ink); }

@media (max-width: 620px) {
  .prose blockquote { padding: 14px 15px; margin: 18px 0; font-size: 15px; }
}

/* ---------- Sources block (linked legislation and cases) ---------- */

.sources {
  margin: 34px 0 0;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue-mid);
  border-radius: var(--radius);
  background: var(--panel);
}
.sources h2 {
  font-family: var(--sans) !important;
  font-size: 12px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--blue-mid);
  margin: 0 0 12px !important;
}
.sources ul { list-style: none; margin: 0; padding: 0; }
.sources li {
  margin-bottom: 9px; padding-left: 20px; position: relative;
  font-size: 15px; line-height: 1.5;
}
.sources li::before {
  content: "\2197"; position: absolute; left: 0; top: 0;
  color: var(--blue-mid); font-size: 13px;
}
.sources li:last-child { margin-bottom: 0; }
.sources .src-note { margin: 14px 0 0; font-size: 13.5px; color: var(--muted); padding-left: 0; }
.sources .src-note::before { content: none; }

@media (max-width: 620px) {
  .sources { padding: 16px 16px; }
  .sources li { font-size: 14.5px; }
}

/* Top bar now carries only the utility links, so align them to the right. */
.topbar .wrap { justify-content: flex-end; }

/* ---------- Topics dropdown in the main navigation ---------- */

.site-nav .has-menu { position: relative; display: flex; align-items: center; }

.submenu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 30px; margin-left: -6px;
  padding: 0; border: 0; border-radius: 6px;
  background: transparent; color: var(--ink-soft); cursor: pointer;
}
.submenu-btn svg { width: 10px; height: 6px; transition: transform .15s ease; }
.submenu-btn:hover { background: var(--panel-2); color: var(--ink); }
.submenu-btn[aria-expanded="true"] svg { transform: rotate(180deg); }

.site-nav ul.submenu {
  position: absolute; top: 100%; left: 0; z-index: 70;
  min-width: 258px; margin: 0; padding: 6px;
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
}
.site-nav .has-menu:hover > ul.submenu,
.site-nav .has-menu:focus-within > ul.submenu,
.site-nav .submenu-btn[aria-expanded="true"] + ul.submenu { display: flex; }

.submenu li { margin: 0; }
.submenu a {
  display: block; padding: 9px 12px; border-radius: 7px;
  font-size: 14.5px; font-weight: 600; color: var(--ink-soft);
  text-decoration: none; box-shadow: none !important;
}
.submenu a:hover { background: var(--panel-2); color: var(--blue); }

/* On a phone the menu is already a vertical list, so show the topics inline. */
@media (max-width: 880px) {
  .site-nav .has-menu { display: block; }
  .submenu-btn { display: none; }
  .site-nav ul.submenu {
    position: static; display: flex;
    min-width: 0; border: 0; box-shadow: none; background: transparent;
    padding: 0 0 0 14px; border-radius: 0;
  }
  .submenu a {
    border-bottom: 1px solid var(--line); border-radius: 0;
    min-height: 44px; display: flex; align-items: center;
    font-size: 14.5px; color: var(--muted);
  }
}

/* ---- Constitution hub: multi-column jump list ---------------------------- */
.prose ul.col-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px 28px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.prose ul.col-list li {
  margin: 0;
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: .95rem;
}
.prose ul.col-list li a { font-weight: 600; }

/* ---- Law firms directory ------------------------------------------------ */
.muted-cell { color: var(--muted); }
.firm-table { min-width: 760px; }
.firm-table td { vertical-align: top; }
.firm-table td:first-child { min-width: 200px; }
.firm-table td:nth-child(2) { min-width: 200px; }
.firm-table td a { word-break: break-word; }
.firm-table td:last-child { text-align: right; white-space: nowrap; }
