:root {
  color-scheme: light;
  --ink: #172d41;
  --muted: #516474;
  --teal: #0b6d66;
  --teal-dark: #06544f;
  --teal-light: #eaf6f2;
  --line: #dce5e9;
  --paper: #fff;
  --ground: #f3f6f8;
  --sand: #eac994;
  --navy: #11263a;
  --display: Lora, Georgia, serif;
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  font-size: 100%;
  color: var(--ink);
  background: var(--ground);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #158b80; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 10; transform: translateY(-20rem); padding: .75rem 1rem; border-radius: .5rem; color: var(--ink); background: white; }
.skip-link:focus { transform: none; }
.icon {
  font: normal 400 1.35rem / 1 "Material Symbols Outlined";
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  flex: none;
  white-space: nowrap;
  overflow-wrap: normal;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}
.shell { width: min(77.5rem, calc(100% - 6rem)); margin-inline: auto; }

.site-header { background: #102538; color: #f3f7fb; border-bottom: 1px solid #ffffff20; }
.topbar { min-height: 4.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; gap: .7rem; align-items: center; font-weight: 600; letter-spacing: -.025em; white-space: nowrap; }
.brand strong { color: var(--sand); font-weight: 700; }
.brand-logo { display: block; width: 2.8rem; height: 2.8rem; flex: none; border-radius: .6rem; border: 1px solid #ffffff60; background: white; object-fit: contain; }
.topbar nav { display: flex; align-items: center; align-self: stretch; gap: 1.75rem; }
.topbar nav a, .source-link { display: inline-flex; align-items: center; gap: .45rem; font-size: .9rem; font-weight: 500; line-height: 1.35; }
.topbar nav a { border-bottom: 2px solid var(--sand); padding-top: 2px; }
.topbar nav .icon { font-size: 1.12rem; }
.install-button { display: inline-flex; flex: none; align-items: center; gap: .4rem; padding: .42rem .67rem; border: 1px solid #efd6ad; border-radius: .5rem; color: #11263a; background: var(--sand); box-shadow: 0 2px 8px #07141d3b; white-space: nowrap; font-size: .88rem; font-weight: 700; line-height: 1.3; }
.install-button:hover { background: #ffdfa9; }
.install-button img, .install-app img { display: block; flex: none; border-radius: .25rem; background: white; }
.source-link { color: inherit; background: none; border: 0; padding: 0; }
.topbar .source-link { color: #d6e1eb; }
.source-link:hover { text-decoration: underline; text-underline-offset: .23em; }

.hero {
  position: relative;
  isolation: isolate;
  color: white;
  overflow: hidden;
  background: radial-gradient(ellipse at top right, #2b475e 0%, #142d43 55%, #102438 100%);
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0 0 0 37%;
  background: url("assets/courthouse.webp") center 46% / cover no-repeat;
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #122a40 5%, #122a40 37%, #122a40cf 52%, #122a4052 75%, #122a4038 100%), linear-gradient(0deg, #10243882, transparent 80%);
}
.hero-inner { min-height: 14rem; display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding-block: 2.2rem; }
.hero-copy { width: min(100%, 38rem); }
.hero-kicker { display: flex; align-items: center; gap: .64rem; color: #f1d4a3; font-size: .78rem; font-weight: 700; letter-spacing: .12em; margin: 0 0 .75rem; }
.hero-kicker span { width: 1.65rem; height: 1px; background: var(--sand); }
.hero h1 { font: 700 clamp(2.8rem, 5.2vw, 4.6rem) / 1.13 var(--display); letter-spacing: -.05em; margin: 0; }
.hero h1 em { color: var(--sand); font-style: normal; }
.hero-description { margin: .83rem 0 0; color: #dfebf3; font-size: 1rem; line-height: 1.57; }
.hero-credit { margin: .55rem 0 0; color: var(--sand); font-size: .88rem; font-weight: 600; line-height: 1.5; }
.lookup-search { margin-top: 1.15rem; }
.search-form { display: flex; align-items: center; gap: .55rem; padding: .35rem; border: 1px solid var(--line); border-radius: .72rem; background: white; color: var(--ink); box-shadow: 0 2px 5px #10253805; }
.search-form:focus-within { outline: 2px solid #158b80; outline-offset: 2px; }
.search-icon { margin-left: .72rem; color: #4a6879; }
.search-form input { flex: 1; width: 0; min-width: 0; align-self: stretch; border: 0; color: var(--ink); background: transparent; padding: .44rem .1rem; outline: 0; }
.search-form input::placeholder { color: #586e80; opacity: 1; }
.search-form input::-webkit-search-cancel-button { display: none; }
.search-submit { flex-shrink: 0; padding: .75rem 1.05rem; border: 0; border-radius: .46rem; background: var(--teal); color: #fff; font-size: .9rem; font-weight: 700; }
.search-submit:hover { background: var(--teal-dark); }
.clear-search { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border: 0; border-radius: .4rem; background: #edf2f4; color: var(--muted); padding: 0; }
.clear-search .icon { font-size: 1rem; }
.search-examples { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin-top: .55rem; color: var(--muted); font-size: .81rem; }
.search-examples button { border: 1px solid #cddde3; border-radius: .34rem; background: white; color: var(--teal-dark); font-size: inherit; padding: .28rem .53rem; }
.search-examples button:hover { background: var(--teal-light); }
.hero-stat { display: flex; align-items: center; gap: .66rem; padding: .75rem .95rem; background: #11263ae3; border: 1px solid #e7ebf54c; border-radius: .6rem; color: #f0f5f8; backdrop-filter: blur(6px); white-space: nowrap; }
.hero-stat .icon { color: var(--sand); }
.hero-stat strong, .hero-stat small { display: block; }
.hero-stat strong { font-size: .89rem; }
.hero-stat small { margin-top: .18rem; color: #c8d6e3; font-size: .76rem; }

.workspace { padding-block: 1.85rem 4.5rem; }
.section-heading { margin: 0 0 .9rem; font-size: 1.13rem; line-height: 1.45; letter-spacing: -.025em; }
.edition-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.edition {
  display: flex;
  width: 100%;
  align-items: center;
  text-align: left;
  gap: .73rem;
  padding: .78rem .85rem;
  border: 1px solid var(--line);
  border-radius: .72rem;
  background: var(--paper);
  color: var(--ink);
  min-height: 4.75rem;
  box-shadow: 0 2px 4px #10253805;
}
.edition:hover { border-color: #73aca6; }
.edition[aria-pressed="true"] { background: #eff8f5; border-color: #0f746b; box-shadow: 0 0 0 1px #0f746b inset; }
.edition-symbol { flex: none; display: grid; place-items: center; width: 2.55rem; height: 2.55rem; border-radius: .55rem; background: #edf2f7; color: #365572; }
.edition[data-edition="administrative"] .edition-symbol { background: #f8f0e1; color: #825d21; }
.edition[aria-pressed="true"] .edition-symbol { background: #dcefe9; color: var(--teal-dark); }
.edition-content { flex: 1; min-width: 0; }
.edition-content strong { display: block; font-weight: 700; font-size: .97rem; line-height: 1.35; letter-spacing: -.025em; }
.edition-content small { display: block; margin-top: .21rem; color: var(--muted); line-height: 1.4; font-size: .83rem; }
.edition-check { display: none; color: var(--teal-dark); font-size: 1.14rem; }
.edition[aria-pressed="true"] .edition-check { display: block; }

.work-grid { margin-top: 1.3rem; display: grid; grid-template-columns: minmax(17rem, 1fr) minmax(0, 2.02fr); align-items: start; gap: 1.2rem; }
.surface { background: var(--paper); border: 1px solid var(--line); border-radius: .82rem; box-shadow: 0 2px 5px #10253805; }
.load-state { margin-top: 1.3rem; padding: 1rem 1.35rem; }
.load-state button { color: var(--teal-dark); }
.results { overflow: hidden; }
.results-head { padding: 1.12rem 1rem .93rem; border-bottom: 1px solid var(--line); }
.results-title { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.results-title h2 { margin: 0; font-size: 1rem; font-weight: 700; letter-spacing: -.025em; }
.count { padding: .23rem .47rem; border-radius: 10rem; background: #eaf0f4; color: #38536a; font-size: .78rem; font-weight: 600; }
.results-head p { margin: .45rem 0 0; color: var(--muted); font-size: .86rem; line-height: 1.45; overflow-wrap: anywhere; }
.results-scroll { max-height: min(66vh, 42rem); min-height: 8rem; overflow-y: auto; scrollbar-color: #b6c8ce transparent; }
.result-list { list-style: none; padding: .35rem; margin: 0; }
.result-list li + li { border-top: 1px solid #ecf0f1; }
.result-pages { display: flex; justify-content: space-between; align-items: center; gap: .3rem; padding: .7rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .79rem; }
.result-pages button { border: 1px solid var(--line); border-radius: .4rem; padding: .35rem .44rem; background: white; color: var(--teal-dark); font-size: inherit; }
.result-pages button:disabled { color: var(--muted); opacity: .6; cursor: default; }
.result-pages button:not(:disabled):hover { background: var(--teal-light); }
.result-button { position: relative; display: flex; align-items: center; width: 100%; gap: .55rem; padding: .68rem .63rem; min-height: 4.75rem; border: 1px solid transparent; border-radius: .45rem; background: none; text-align: left; color: var(--ink); }
.result-button:hover { background: #f3f7f8; }
.result-button[aria-current="true"] { border-color: #b9ddd4; background: var(--teal-light); }
.result-button:focus-visible { outline-offset: -2px; }
.result-number { align-self: flex-start; white-space: nowrap; min-width: 3.6rem; margin-top: .14rem; color: #466075; font-size: .85rem; font-weight: 700; }
.result-button[aria-current="true"] .result-number, .result-button[aria-current="true"] .result-arrow { color: var(--teal-dark); }
.result-copy { flex: 1; min-width: 0; }
.result-name { display: block; font-size: .88rem; font-weight: 600; line-height: 1.44; overflow-wrap: anywhere; }
.result-old { display: block; color: var(--muted); font-size: .77rem; line-height: 1.45; margin-top: .16rem; }
.result-arrow { color: #637b8a; font-size: 1rem; }
.empty-list { padding: 1rem; color: var(--muted); font-size: .94rem; }
.retry-button { display: block; margin-top: .65rem; padding: .35rem .65rem; color: var(--teal-dark); background: white; border: 1px solid var(--line); border-radius: .35rem; }
.retry-button:hover { background: var(--teal-light); }

.reader { min-width: 0; overflow: clip; scroll-margin-top: 1rem; }
.reader-top { padding: 1.3rem 1.5rem 1.15rem; }
.reader-meta { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .78rem; }
.reader-edition { color: var(--teal-dark); background: #e8f5f1; border-radius: .35rem; padding: .27rem .5rem; font-size: .76rem; letter-spacing: .015em; font-weight: 700; }
.icon-button { display: inline-grid; flex: none; place-items: center; min-height: 2.14rem; min-width: 2.14rem; border: 1px solid var(--line); border-radius: .4rem; color: #406076; background: white; }
.icon-button:hover { background: #eff6f6; color: var(--teal-dark); }
.icon-button .icon { font-size: 1.16rem; }
.reader h2 { margin: 0; font: 700 clamp(1.5rem, 2.65vw, 2.1rem) / 1.31 var(--display); letter-spacing: -.027em; overflow-wrap: anywhere; }
.mapping { margin: .6rem 0 0; color: var(--muted); font-size: .89rem; line-height: 1.58; }
.mapping strong { color: #344e62; }
.mapping ul { list-style: none; padding-left: 0; margin: .12rem 0 0; }
.mapping li + li { margin-top: .15rem; }
.notice { display: flex; align-items: flex-start; gap: .48rem; padding: .59rem .69rem; margin-top: .9rem; background: #faf4e7; border: 1px solid #f0e4c9; border-radius: .43rem; color: #684d24; font-size: .82rem; font-weight: 500; line-height: 1.47; }
.notice .icon { font-size: 1rem; margin-top: .07rem; }
.notice button { margin-left: auto; color: #684d24; background: none; border: 0; padding: 0; font-size: inherit; text-align: right; text-decoration: underline; text-underline-offset: .16em; flex-shrink: 0; }
.reader-tabs { display: flex; flex-wrap: wrap; padding-inline: 1.5rem; gap: .32rem 1.42rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.reader-tab { display: flex; align-items: center; gap: .39rem; padding: .87rem .1rem .79rem; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; font-weight: 600; font-size: .87rem; white-space: nowrap; }
.reader-tab .icon { font-size: 1.11rem; }
.reader-tab:hover, .reader-tab[aria-selected="true"] { color: var(--teal-dark); }
.reader-tab[aria-selected="true"] { border-bottom-color: var(--teal); }
.reader-body { padding: 1.45rem 1.5rem 1.8rem; }
.reader-body > h3, .content-field h3 { margin: 0 0 .64rem; font-size: 1rem; font-weight: 700; line-height: 1.45; }
.law-text, .prose { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; margin: 0; font-size: 1rem; }
.law-text strong { color: #095951; font-weight: 700; }
.comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin-top: 1rem; }
.comparison div { border: 1px solid var(--line); border-radius: .45rem; padding: .75rem; background: #f7f9fa; }
.comparison dt { font-weight: 700; color: var(--muted); font-size: .85rem; margin-bottom: .4rem; }
.comparison dd { margin: 0; }
.content-field + .content-field, .row-block + .row-block { margin-top: 1.35rem; }
.row-block + .row-block { padding-top: 1.35rem; border-top: 1px solid var(--line); }
.empty-field { color: var(--muted); line-height: 1.65; }
.empty-reader { min-height: 16rem; display: grid; align-content: center; justify-items: center; padding: 2rem; text-align: center; }
.empty-reader > .icon { color: var(--teal); font-size: 2rem; margin-bottom: .65rem; }
.empty-reader p { margin-bottom: 0; color: var(--muted); line-height: 1.65; }
.back-button { display: none; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); }
.footer-inner { min-height: 4.8rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: .8rem; }
.footer-brand { display: inline-flex; align-items: center; gap: .48rem; font-size: .88rem; font-weight: 600; text-wrap: nowrap; }
.footer-brand .icon { font-size: 1.14rem; color: var(--teal); }
.footer-details { text-align: center; }
.footer-traffic { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1rem; margin: 0; font-size: .8rem; line-height: 1.5; }
.footer-traffic div { display: flex; align-items: baseline; gap: .29rem; }
.footer-traffic dt::after { content: ":"; }
.footer-traffic dd { margin: 0; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.footer-credit { margin: .35rem 0 0; font-size: .78rem; line-height: 1.5; }
.site-footer .source-link { text-align: right; }

dialog { width: min(45rem, calc(100% - 1.5rem)); max-height: calc(100% - 1.5rem); overflow: auto; padding: 0; color: var(--ink); border: 1px solid var(--line); border-radius: .8rem; box-shadow: 0 18px 55px #0a1a3e60; }
dialog::backdrop { background: #0b1d2bb3; }
.dialog-head { position: sticky; top: 0; background: white; display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font: 700 1.5rem / 1.35 var(--display); }
.dialog-content { padding: .5rem 1.25rem 1.35rem; line-height: 1.6; }
.install-dialog { width: min(33rem, calc(100% - 1.5rem)); }
.install-app { display: flex; align-items: center; gap: .75rem; padding-block: .55rem; font-weight: 700; }
.install-app img { border: 1px solid var(--line); border-radius: .55rem; }
.install-steps { margin: .45rem 0 0; padding: 0; list-style: none; }
.install-steps li { padding: .7rem 0; border-top: 1px solid var(--line); }
.install-steps strong { display: block; color: var(--teal-dark); }
.about-credit { margin-block: .65rem 1rem; }
.about-credit p { margin: .3rem 0; }
.about-terms { padding: .8rem .9rem; background: #eff6f5; border: 1px solid #d6e9e4; border-radius: .5rem; }
.about-terms h3 { margin: 0; font-size: 1rem; }
.about-terms p { margin: .35rem 0 0; }
.source-section { padding-top: .8rem; margin-top: .8rem; border-top: 1px solid var(--line); }
.source-section h3 { margin: 0 0 .3rem; font-size: 1.06rem; }
.source-section p, .source-section ul { margin: .3rem 0 .5rem; overflow-wrap: anywhere; }
.source-section ul { padding-left: 1.1rem; }
.source-section li + li { margin-top: .35rem; }
.source-status { color: #684d24; font-size: .9rem; }
.toast { position: fixed; z-index: 2; bottom: 1rem; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 2rem); border-radius: .45rem; background: #173549; color: #fff; padding: .65rem .95rem; box-shadow: 0 3px 15px #0818274a; font-size: .91rem; }

@media (min-width: 881px) {
  .results { position: sticky; top: 1rem; }
}
@media (max-width: 1050px) {
  .shell { width: calc(100% - 3rem); }
  .hero-stat { display: none; }
}
@media (max-width: 880px) {
  .work-grid { gap: .85rem; grid-template-columns: minmax(14rem, 1fr) minmax(0, 1.65fr); }
  .result-button { align-items: flex-start; }
  .result-number { min-width: 0; }
  .reader-top, .reader-body { padding-inline: 1rem; }
  .reader-tabs { padding-inline: 1rem; gap: .12rem .8rem; }
}
@media (max-width: 670px) {
  .shell { width: calc(100% - 1.5rem); }
  .topbar { min-height: 3.7rem; }
  .topbar nav { gap: .7rem; }
  .topbar nav .icon { display: none; }
  .topbar nav a, .topbar .source-link { font-size: .77rem; white-space: nowrap; }
  .brand { font-size: .89rem; gap: .4rem; }
  .brand-logo { width: 2.35rem; height: 2.35rem; }
  .hero-inner { min-height: 0; padding-block: 1.8rem 1.55rem; }
  .hero::before { left: 10%; }
  .hero::after { background: linear-gradient(90deg, #122a40 1%, #122a40eb 38%, #122a40a5 100%); }
  .hero-description { margin-top: .65rem; }
  .workspace { padding-block: 1.25rem 2.6rem; }
  .edition-grid { gap: .42rem; }
  .edition { position: relative; min-height: 5.6rem; flex-direction: column; justify-content: start; gap: .31rem; padding: .42rem .2rem .45rem; text-align: center; }
  .edition-symbol { width: 2.08rem; height: 2.08rem; }
  .edition-symbol .icon { font-size: 1.18rem; }
  .edition-content { width: 100%; }
  .edition-content strong { font-size: .875rem; text-wrap: balance; }
  .edition-content small { margin-top: .08rem; font-size: .75rem; line-height: 1.38; text-wrap: balance; }
  .edition-count-suffix { display: none; }
  .edition-check { position: absolute; top: .27rem; right: .27rem; font-size: .9rem; }
  .lookup-search { margin-top: .85rem; }
  .work-grid { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: .9rem; }
  .results-scroll { max-height: 21rem; }
  .result-button { min-height: 3.7rem; align-items: center; }
  .result-number { min-width: 3.62rem; }
  .back-button { display: inline-flex; align-items: center; gap: .16rem; margin: 0 0 .78rem; padding: .12rem .1rem; color: var(--teal-dark); background: none; border: 0; font-size: .84rem; font-weight: 600; }
  .back-button .icon { font-size: 1.05rem; }
  .reader-top { padding-top: .95rem; }
  .reader-tabs { column-gap: .8rem; }
  .reader-tab { font-size: .8rem; }
  .reader-tab .icon { display: none; }
  .footer-inner { flex-wrap: wrap; gap: .5rem 1rem; }
  .footer-details { order: 1; width: 100%; text-align: left; }
  .footer-traffic { justify-content: flex-start; }
}
@media (max-width: 540px) {
  .topbar { align-items: start; flex-direction: column; gap: .3rem; padding-top: .45rem; }
  .topbar nav { min-height: 2.65rem; gap: .8rem; }
  .install-button { font-size: .83rem; }
}
@media (max-width: 370px) {
  .search-submit { padding-inline: .52rem; font-size: .81rem; }
  .search-form { gap: .3rem; }
  .search-icon { margin-left: .25rem; }
  .comparison { grid-template-columns: 1fr; }
}
