/* ==========================================================================
   Land Use & Zoning regulation pages — additions to the Environmental Services
   system (../comprehensive-plan/css/plan.css supplies tokens, chrome, reader)
   ========================================================================== */

.reg h2 { font-size: 26px; line-height: 34px; }
.reg h3 { font-size: 19px; line-height: 26px; }
.reg .idx__num svg { margin-top: 1px; }
/* sidebar lists this page's sections only — no per-page wrapper */
.idx__sub--flat { display: block; margin: 0; padding-left: 0; }

/* ---------- legal outline: A. / 1. / a. / i. ---------- */
.doc ol.legal { list-style: none; margin: 14px 0 0; padding: 0; counter-reset: none; }
.doc ol.legal > li {
  display: grid; grid-template-columns: 2.1em minmax(0, 1fr); column-gap: 6px;
  padding-left: 0; font-size: 15px; line-height: 26px; color: #2c2c3a;
}
.doc ol.legal > li::before { content: none; }
.doc ol.legal > li + li { margin-top: 10px; }
.legal__m { font-weight: 600; color: var(--outline-active); text-align: right; padding-right: 2px; }
.legal__t { min-width: 0; }
.doc ol.legal > li > ol.legal { grid-column: 2; margin-top: 10px; }
.doc ol.legal--d1 > li, .doc ol.legal--d2 > li, .doc ol.legal--d3 > li { font-size: 14.5px; }
.doc ol.legal--d2 .legal__m, .doc ol.legal--d3 .legal__m { color: var(--grey); font-weight: 500; }

/* ---------- numbered definitions ---------- */
.doc ol.defs { margin-top: 18px; counter-reset: def; columns: 1; }
.doc ol.defs > li {
  counter-increment: def; padding: 12px 14px 12px 52px; margin: 0;
  border: 1px solid var(--outline-var); border-radius: var(--radius-sm);
  background: var(--white); font-size: 14.5px; line-height: 24px;
  break-inside: avoid; scroll-margin-top: 96px;
}
.doc ol.defs > li + li { margin-top: 8px; }
.doc ol.defs > li::before {
  content: counter(def); left: 14px; top: 13px;
  background: var(--surface-blue); color: var(--outline-active);
}
.doc ol.defs dfn, .term { font-style: italic; font-weight: 700; color: var(--ink); }
.doc ol.defs > li:target { border-color: var(--outline-active); background: var(--surface-purple); }

.abbr-table { margin-top: 16px; max-width: 640px; }
.abbr-table table { border-collapse: collapse; width: 100%; font-size: 14px; }
.abbr-table th, .abbr-table td { padding: 8px 14px; text-align: left; }
.abbr-table thead th {
  background: var(--surface-blue); color: var(--outline-active); font-size: 12px;
  font-weight: 700; border-bottom: 1px solid var(--outline);
}
.abbr-table tbody th { width: 9em; font-weight: 700; }
.abbr-table abbr { text-decoration: none; }
.abbr-table tbody tr + tr > * { border-top: 1px solid var(--outline-var); }

/* ---------- tables (Appendix B, curve radii) ---------- */
.tbl--reg figcaption { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.tbl--reg tbody th[scope="rowgroup"] { vertical-align: top; background: #fafafb; }
.tbl--reg tbody td { vertical-align: top; }
.tbl--reg tbody tr:nth-child(even) { background: transparent; }
.tbl--reg tbody tr + tr > * { border-top: 1px solid var(--outline-var); }
.notes-head { margin-top: 18px !important; font-weight: 700; color: var(--ink); }

/* ---------- Appendix A: certificate / signature blocks ---------- */
.form {
  margin-top: 18px; padding: 22px 24px 20px;
  border: 1px solid var(--outline); border-radius: var(--radius); background: var(--white);
  max-width: 78ch;
}
.form + .form { margin-top: 14px; }
.form__title {
  margin: 0 0 10px; font-size: 13px; line-height: 18px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--outline-active);
}
.doc .form p { font-size: 14.5px; line-height: 26px; }
.doc .form p + p { margin-top: 10px; }
.form__label { font-weight: 600; }
.blank {
  display: inline-block; width: 9em; height: 1px; vertical-align: -3px;
  border-bottom: 1px solid var(--ink); margin: 0 3px;
}
.blank--short { width: 2.6em;
}
.form__sigs { display: flex; flex-wrap: wrap; gap: 18px 40px; margin-top: 22px; }
.form__sig { display: flex; flex-direction: column; gap: 6px; min-width: 210px; font-size: 13px; color: var(--grey); }
.form__line { display: block; height: 1px; background: var(--ink); margin-top: 18px; }

/* ---------- figure: standard plate ---------- */
.fig--plate .fig__frame { max-width: 470px; background: var(--white); }

/* ---------- contact + downloads cards, on-page contents ---------- */
.reg-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: none !important; }
.reg-card {
  padding: 20px; border-radius: var(--radius); background: var(--surface-grey);
  border: 1px solid var(--outline-var);
}
.reg-card--contact { background: var(--surface-yellow); border-color: transparent; }
.reg-card .h5 { margin-bottom: 10px; }
.doc .reg-card ul { list-style: none; margin: 0; padding: 0; }
.doc .reg-card li { padding-left: 0; font-size: 14px; line-height: 22px; }
.doc .reg-card li::before { content: none; }
.doc .reg-card li + li { margin-top: 10px; }
.reg-card--contact li { display: flex; flex-direction: column; gap: 2px; }
.reg-card--contact li > span { color: #2c2c3a; }
.reg-card--contact .cta { font-size: 15px; text-transform: none; }
.reg-card__note { margin-top: 12px !important; font-size: 12.5px; line-height: 19px; color: var(--grey) !important; }
.reg-card__links a { color: var(--pri-purple); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.reg-card__links a:hover { color: var(--outline-active); }

.reg-toc {
  margin-top: 24px !important; padding: 22px 24px;
  border: 1px solid var(--outline); border-radius: var(--radius); background: var(--white);
}
.reg-toc .tagline { color: var(--grey); margin-bottom: 12px; }
.doc .reg-toc ol { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; }
.doc .reg-toc > ol > li { padding-left: 0; break-inside: avoid; font-size: 14.5px; line-height: 22px; margin: 0 0 14px; }
.doc .reg-toc li::before { content: none; }
.reg-toc > ol > li > a { font-weight: 700; color: var(--ink); }
.doc .reg-toc ul { list-style: none; margin: 6px 0 0; padding: 0; }
.doc .reg-toc ul li { padding-left: 0; font-size: 13.5px; line-height: 21px; margin-top: 3px; }
.reg-toc ul a { color: var(--grey); }
.reg-toc a:hover { color: var(--pri-purple); text-decoration: underline; }

@media (max-width: 760px) {
  .reg-cards { grid-template-columns: minmax(0, 1fr); }
  .doc .reg-toc ol { columns: 1; }
  .doc ol.legal > li { grid-template-columns: 1.8em minmax(0, 1fr); }
  .doc ol.legal > li > ol.legal { grid-column: 1 / -1; padding-left: 1.2em; }
}
@media print {
  .reg-cards, .reg-toc { display: none !important; }
  .form { break-inside: avoid; }
}
