:root {
  --page: #f5f0e6;
  --paper: #fffaf0;
  --paper-2: #efe4d0;
  --ink: #1f2320;
  --muted: #6d675e;
  --line: rgba(31, 35, 32, 0.14);
  --green: #123b31;
  --green-2: #1e5548;
  --bordeaux: #7d2634;
  --gold: #b18a45;
  --red: #a13a33;
  --shadow: 0 8px 24px rgba(31, 35, 32, 0.07);
  --radius: 6px;
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(18,59,49,.035), rgba(125,38,52,.02)),
    var(--page);
}

a {
  color: var(--green);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.nowrap {
  white-space: nowrap;
}

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: .7rem clamp(1rem, 4vw, 2.25rem);
  background: var(--green);
  color: white;
  border-bottom: 1px solid rgba(177,138,69,.7);
  box-shadow: 0 2px 12px rgba(31,35,32,.12);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: white;
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 6px;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  font-weight: 700;
}

.brand strong {
  display: block;
  font-size: clamp(.95rem, 2.5vw, 1.05rem);
  letter-spacing: 0;
  font-weight: 750;
  overflow-wrap: normal;
  word-break: normal;
}

.brand small {
  display: block;
  color: rgba(255,255,255,.72);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  overflow-wrap: normal;
  word-break: normal;
}

.nav {
  display: flex;
  gap: .8rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a, .link-button {
  border: 0;
  background: none;
  color: white;
  font: inherit;
  font-weight: 650;
  font-size: .92rem;
  cursor: pointer;
  padding: .35rem .1rem;
}

.page-shell {
  width: min(1080px, calc(100vw - 2rem));
  margin: clamp(.9rem, 2.5vw, 1.8rem) auto 3rem;
}

.site-footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  padding: 1.4rem 1rem;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--line);
}

.law-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: .9rem;
  align-items: stretch;
  min-width: 0;
}

.portal-overview,
.dashboard-panel {
  background: rgba(255,255,255,.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.portal-overview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: clamp(1.1rem, 3vw, 1.7rem);
  margin-bottom: .9rem;
}

.portal-summary {
  min-width: 0;
}

.portal-summary h1 {
  font-size: clamp(1.8rem, 3.2vw, 2.45rem);
  margin-bottom: .65rem;
}

.portal-summary p {
  max-width: 68ch;
}

.portal-status {
  display: grid;
  gap: 0;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255,250,240,.72);
  overflow: hidden;
}

.portal-status div {
  padding: .8rem .9rem;
  border-bottom: 1px solid var(--line);
}

.portal-status div:last-child {
  border-bottom: 0;
}

.portal-status dt {
  margin-bottom: .2rem;
}

.portal-status dd {
  font-weight: 650;
}

.dashboard-panel {
  padding: clamp(1rem, 2.6vw, 1.45rem);
  margin-bottom: .9rem;
}

.portal-shell {
  width: min(1380px, calc(100vw - 2rem));
  margin: 1rem auto 3rem;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.portal-nav {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: .15rem;
  padding: .7rem;
  background: rgba(255,255,255,.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.portal-nav a,
.portal-logout {
  width: 100%;
  display: flex;
  align-items: center;
  min-height: 2.2rem;
  padding: .52rem .65rem;
  border-radius: 4px;
  color: var(--ink);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 680;
}

.portal-nav a:hover,
.portal-nav a.active,
.portal-logout:hover {
  background: rgba(18,59,49,.08);
  color: var(--green);
}

.portal-logout {
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.portal-main {
  min-width: 0;
}

.portal-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: .9rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--line);
}

.portal-page-head h1 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
  margin-bottom: .9rem;
}

.portal-panel {
  min-width: 0;
  padding: 1rem;
  margin-bottom: .9rem;
  background: rgba(255,255,255,.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
}

.portal-panel h2 {
  font-size: 1.1rem;
  margin-bottom: .4rem;
}

.next-step-panel {
  border-left: 4px solid var(--green);
}

.metric-row {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  padding: .62rem 0;
  border-top: 1px solid rgba(31,35,32,.12);
}

.metric-row:first-of-type {
  border-top: 0;
}

.metric-row strong {
  color: var(--green);
  font-size: 1.05rem;
}

.metric-row span {
  color: var(--muted);
  font-size: .88rem;
  text-align: right;
}

.portal-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(31,35,32,.12);
  border-radius: 5px;
  background: rgba(255,250,240,.42);
}

.portal-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: .92rem;
}

.portal-table th,
.portal-table td {
  padding: .72rem .78rem;
  border-bottom: 1px solid rgba(31,35,32,.12);
  text-align: left;
  vertical-align: middle;
}

.portal-table th {
  color: var(--muted);
  background: rgba(239,228,208,.45);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.portal-table tr:last-child td {
  border-bottom: 0;
}

.portal-table td span {
  color: var(--muted);
}

.inline-guess-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .6rem;
  margin-top: .85rem;
}

.message-list {
  display: grid;
  gap: .55rem;
}

.message-list article {
  display: grid;
  grid-template-columns: minmax(120px, .45fr) minmax(0, 1fr) auto;
  gap: .8rem;
  align-items: start;
  padding: .72rem .8rem;
  border: 1px solid rgba(31,35,32,.12);
  border-radius: 5px;
  background: rgba(255,250,240,.45);
}

.message-list.full article {
  grid-template-columns: minmax(150px, .35fr) minmax(0, 1fr) auto;
}

.message-list strong {
  color: var(--green);
  font-size: .92rem;
}

.message-list span,
.message-list small,
.empty-state,
.muted-action {
  color: var(--muted);
}

.muted-action {
  display: inline-block;
  padding: .35rem 0;
  font-size: .86rem;
  font-weight: 700;
}

.message-list span {
  min-width: 0;
  overflow-wrap: break-word;
}

.message-list small {
  white-space: nowrap;
  font-size: .78rem;
}

.empty-state {
  margin: 0;
  padding: .85rem;
  border: 1px dashed rgba(31,35,32,.2);
  border-radius: 5px;
  background: rgba(255,250,240,.35);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .8rem;
  margin-bottom: .85rem;
  border-bottom: 1px solid var(--line);
}

.panel-head h2,
.dashboard-panel h2 {
  margin-bottom: 0;
}

.registry-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .65rem;
}

.registry-grid article,
.rules-table div {
  min-width: 0;
  padding: .85rem;
  border: 1px solid rgba(31,35,32,.12);
  border-radius: 5px;
  background: rgba(255,250,240,.62);
}

.registry-grid strong,
.registry-grid span,
.rules-table strong,
.rules-table span {
  display: block;
}

.registry-grid strong,
.rules-table strong {
  color: var(--green);
  margin-bottom: .25rem;
}

.registry-grid span,
.rules-table span {
  color: var(--muted);
  line-height: 1.45;
}

.rules-table {
  display: grid;
  gap: .55rem;
}

.notice-panel {
  display: grid;
  gap: .5rem;
}

.law-hero-copy,
.document,
.mandate-card,
.practice-strip article {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.64)),
    var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.practice-strip article,
.ordinance-grid article,
.stats-grid article,
.jurisdiction-list article,
.case-card {
  box-shadow: none;
}

.law-hero-copy {
  display: grid;
  align-content: center;
  min-height: 0;
  padding: clamp(1.35rem, 4vw, 2.6rem);
  overflow: hidden;
  min-width: 0;
}

.law-hero-copy h1 {
  max-width: 11em;
  font-size: clamp(1.85rem, 3.6vw, 2.75rem);
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
  text-wrap: normal;
}

.mandate-card {
  padding: clamp(1.1rem, 3vw, 1.65rem);
  display: block;
  min-width: 0;
  overflow: hidden;
}

.mandate-card > * {
  position: relative;
  z-index: 1;
}

.mandate-card h2 {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.18;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: manual;
  max-width: 100%;
}

.mandate-card dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: .8rem;
  margin: 1.25rem 0 0;
}

.mandate-card dl > div {
  padding-top: .75rem;
  border-top: 1px solid rgba(31,35,32,.12);
  min-width: 0;
}

.mandate-card dd {
  overflow-wrap: break-word;
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
  margin: 1.25rem 0 0;
}

.practice-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: .9rem;
  margin-top: .9rem;
}

.practice-strip article {
  padding: .9rem;
}

.practice-strip span {
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 900;
}

.practice-strip h2 {
  font-size: .98rem;
  margin-top: .25rem;
}

.ordinance-grid,
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .85rem;
  margin-top: 1.1rem;
}

.ordinance-grid article,
.stats-grid article,
.jurisdiction-list article {
  min-width: 0;
  padding: .85rem;
  border: 1px solid rgba(31,35,32,.12);
  border-radius: 6px;
  background: rgba(255,255,255,.42);
}

.ordinance-grid span {
  display: inline-block;
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 900;
  margin-bottom: .25rem;
  font-size: .82rem;
}

.ordinance-grid p,
.contract-clauses p,
.jurisdiction-list span,
.official-notice p,
.document p {
  overflow-wrap: break-word;
}

.ordinance-grid h3,
.contract-clauses h2 {
  font-size: .98rem;
  margin-bottom: .35rem;
  text-wrap: auto;
}

.jurisdiction-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.jurisdiction-list {
  display: grid;
  gap: .7rem;
}

.jurisdiction-list article {
  background: rgba(255,255,255,.42);
  border-color: rgba(31,35,32,.12);
}

.jurisdiction-list strong,
.jurisdiction-list span {
  display: block;
}

.jurisdiction-list strong {
  color: var(--green);
  margin-bottom: .25rem;
}

.jurisdiction-list span {
  color: var(--muted);
  line-height: 1.45;
}

.official-notice {
  border-color: rgba(125,38,52,.28);
}

.contract-clauses {
  display: grid;
  gap: .75rem;
  margin-top: 1.2rem;
}

.contract-clauses article {
  padding-top: .7rem;
  border-top: 1px solid var(--line);
}

.contract-clauses article:first-child {
  padding-top: 0;
  border-top: 0;
}

.stats-grid article {
  display: grid;
  gap: .3rem;
  align-content: start;
}

.stats-grid strong {
  color: var(--green);
  font-family: inherit;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  line-height: 1;
  font-weight: 780;
  overflow-wrap: anywhere;
}

.stats-grid span {
  color: var(--muted);
  font-size: .74rem;
  font-weight: 850;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.document {
  margin: 0 0 1rem;
  padding: clamp(1.15rem, 3vw, 1.8rem);
  overflow: hidden;
  min-width: 0;
}

.compact-document {
  padding-block: clamp(1rem, 2.6vw, 1.55rem);
}

.compact-document .document-title,
.compact-document h2 {
  margin-bottom: .65rem;
}

.narrow {
  max-width: 680px;
  margin-inline: auto;
}

h1, h2, h3 {
  font-family: inherit;
  line-height: 1.18;
  margin: .2rem 0 .75rem;
  color: var(--green);
  letter-spacing: 0;
  text-wrap: auto;
  font-weight: 760;
}

h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
h2 { font-size: clamp(1.25rem, 2vw, 1.65rem); }
h3 { font-size: 1rem; }

.document h1,
.document h2,
.document-title {
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: manual;
}

.document h1 {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.document h2,
.document-title {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
}

p {
  line-height: 1.55;
  margin-top: .55rem;
  margin-bottom: .75rem;
}

.lead {
  font-size: 1.02rem;
  color: var(--bordeaux);
  max-width: 68ch;
}

.eyebrow, .case-number {
  color: var(--gold);
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: .72rem;
}

.actions, .split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.45rem;
  padding: .62rem .9rem;
  border-radius: 5px;
  border: 1px solid var(--green);
  color: var(--green);
  background: rgba(255,250,240,.9);
  font-weight: 780;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--green);
  color: white;
}

.button.ghost {
  border-color: rgba(31,35,32,.25);
  color: var(--ink);
}

.button.small {
  min-height: 2.2rem;
  padding: .45rem .72rem;
  font-size: .9rem;
}

.button.full { width: 100%; margin-top: .75rem; }

.form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

label, fieldset {
  display: grid;
  gap: .4rem;
  border: 0;
  padding: 0;
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

legend {
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: .75rem;
}

input, textarea, select {
  width: 100%;
  border: 1px solid rgba(31,35,32,.24);
  border-radius: 5px;
  padding: .82rem;
  background: rgba(255,255,255,.75);
  color: var(--ink);
  font: inherit;
}

input:focus, textarea:focus, select:focus {
  outline: 3px solid rgba(177,138,69,.28);
  border-color: var(--gold);
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  color: var(--ink);
  font-weight: 560;
  padding: .8rem;
  border: 1px solid rgba(31,35,32,.12);
  border-radius: 6px;
  background: rgba(255,255,255,.42);
}

.choice input {
  width: auto;
  margin-top: .28rem;
}

.notice {
  padding: .9rem 1rem;
  margin-bottom: 1rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.notice.success { border-color: rgba(18,59,49,.35); color: var(--green); }
.notice.error { border-color: rgba(161,58,51,.45); color: var(--red); }

.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.case-card {
  display: grid;
  gap: .6rem;
  padding: 1rem;
  background: rgba(255,250,240,.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
}

.case-card h2 {
  font-size: 1.05rem;
  margin-bottom: .15rem;
}

.status {
  width: fit-content;
  display: inline-block;
  margin: .1rem 0;
  padding: .25rem .48rem;
  border: 1px solid rgba(31,35,32,.2);
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .75rem;
  background: rgba(255,255,255,.55);
  white-space: nowrap;
}

.status.open {
  color: var(--green);
  border-color: rgba(18,59,49,.25);
  background: rgba(18,59,49,.06);
}

.status.locked {
  color: var(--bordeaux);
  border-color: rgba(125,38,52,.25);
  background: rgba(125,38,52,.06);
}

.case-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.stamp {
  justify-self: start;
  align-self: center;
  transform: rotate(-3deg);
  border: 3px double var(--red);
  color: var(--red);
  padding: .5rem .78rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 900;
  background: rgba(255,250,240,.78);
}

.stamp.approved {
  border-color: var(--green);
  color: var(--green);
}

dt {
  color: var(--muted);
  font-size: .76rem;
  text-transform: uppercase;
  font-weight: 850;
  letter-spacing: .05em;
}

dd { margin: .15rem 0 0; }

.info-box {
  padding: 1rem;
  margin: .8rem 0;
  background: rgba(239,228,208,.72);
  border-left: 4px solid var(--gold);
  border-radius: 0 6px 6px 0;
}

.redacted-preview {
  display: grid;
  gap: .7rem;
  margin: 1.2rem 0;
  padding: 1rem;
  border: 1px solid rgba(31,35,32,.14);
  border-radius: 6px;
  background: rgba(255,255,255,.45);
}

.redacted-preview span {
  display: block;
  height: .95rem;
  background: linear-gradient(90deg, var(--ink), rgba(31,35,32,.72));
  border-radius: 2px;
}

.redacted-preview span:nth-child(2) {
  width: 82%;
}

.redacted-preview span:nth-child(3) {
  width: 58%;
}

.guess-history {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.subdocument {
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.subdocument h3 {
  margin-bottom: .7rem;
}

.timeline-list {
  display: grid;
  gap: .75rem;
}

.timeline-list article {
  padding: .85rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255,255,255,.42);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .45rem;
  align-items: end;
  max-width: 620px;
}

.countdown span {
  display: block;
  padding: .4rem .2rem;
  background: rgba(255,255,255,.5);
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: center;
  font-family: Georgia, serif;
  font-size: clamp(1.55rem, 8vw, 3.05rem);
  color: var(--bordeaux);
}

.countdown small {
  color: var(--muted);
  text-align: center;
}

.countdown-label {
  color: var(--muted);
  font-weight: 850;
  margin-top: 1.2rem;
}

.legal-note, .gag, .outro {
  color: var(--muted);
}

.code-display {
  display: inline-block;
  margin: .7rem 0 1rem;
  padding: .85rem 1rem;
  border: 2px dashed var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.42rem;
  font-weight: 900;
  background: rgba(255,255,255,.55);
}

.case-video {
  width: 100%;
  max-height: 72vh;
  border-radius: 8px;
  background: #111;
  border: 1px solid rgba(31,35,32,.18);
}

.hidden { display: none; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: rgba(255,255,255,.55);
  padding: .12rem .25rem;
  border-radius: 4px;
}

@media (min-width: 760px) {
  .portal-overview {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .85fr);
    align-items: start;
  }

  .registry-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .rules-table {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .law-hero {
    grid-template-columns: minmax(0, 1.18fr) minmax(360px, .9fr);
    align-items: start;
  }

  .practice-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ordinance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .jurisdiction-section {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    align-items: start;
  }

  .jurisdiction-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-head {
    grid-template-columns: 1fr auto;
  }

  .meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1060px) {
  .ordinance-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .portal-shell {
    width: min(100% - 1rem, 1120px);
    grid-template-columns: 1fr;
  }

  .portal-nav {
    position: static;
    display: flex;
    gap: .25rem;
    overflow-x: auto;
    padding: .55rem;
  }

  .portal-nav a,
  .portal-logout {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .portal-grid {
    grid-template-columns: 1fr;
  }

  .message-list article,
  .message-list.full article {
    grid-template-columns: 1fr;
    gap: .25rem;
  }

  .message-list small {
    white-space: normal;
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 1rem, 1120px);
  }

  .site-header {
    align-items: flex-start;
    padding: .7rem .9rem;
  }

  .brand {
    gap: .55rem;
  }

  .brand-mark {
    width: 2rem;
    height: 2rem;
    font-size: 1.2rem;
    flex: 0 0 auto;
  }

  .brand strong {
    font-size: .98rem;
  }

  .brand small {
    font-size: .64rem;
    letter-spacing: .06em;
  }

  .law-hero-copy,
  .document,
  .mandate-card {
    padding: 1.15rem;
  }

  .law-hero-copy h1 {
    font-size: clamp(1.75rem, 8vw, 2.05rem);
  }

  .lead {
    font-size: 1rem;
  }

  .portal-overview {
    padding: 1rem;
  }

  .portal-summary h1 {
    font-size: 1.65rem;
  }

  .portal-page-head {
    display: grid;
  }

  .portal-panel {
    padding: .85rem;
  }

  .inline-guess-form {
    grid-template-columns: 1fr;
  }

  .document h1,
  .document h2,
  .document-title {
    font-size: clamp(1.25rem, 6.5vw, 1.55rem);
  }

  .ordinance-grid article,
  .stats-grid article,
  .jurisdiction-list article,
  .practice-strip article {
    padding: .95rem;
  }
}
