:root {
    --bg: #fbfbfa;
    --panel: #ffffff;
    --panel-2: #f6f6f4;
    --ink: #171717;
    --muted: #62676f;
    --soft: #8c9299;
    --line: #e8e7e3;
    --line-strong: #d7d6d1;
    --brand: #c91f26;
    --brand-dark: #9f171d;
    --gold: #99711d;
    --teal: #28746e;
    --indigo: #465a90;
    --shadow: 0 10px 30px rgba(17, 24, 39, .05);
    --sidebar: 294px;
    --topbar: 62px;
    --law-line-height: 1.7;
    --law-text-weight: 400;
    color-scheme: light;
}

html[data-theme="dark"] {
    --bg: #0f1115;
    --panel: #14171d;
    --panel-2: #191d24;
    --ink: #f1f3f5;
    --muted: #adb4bd;
    --soft: #747d88;
    --line: #272c34;
    --line-strong: #343b45;
    --brand: #f05259;
    --brand-dark: #ff747a;
    --gold: #d9b45f;
    --teal: #56bdb2;
    --indigo: #94a4e8;
    --shadow: 0 12px 36px rgba(0, 0, 0, .24);
    color-scheme: dark;
}

html[data-text-size="small"] {
    --law-font-size: 14px;
}

html,
html[data-text-size="normal"] {
    --law-font-size: 15px;
}

html[data-text-size="large"] {
    --law-font-size: 17px;
}

html[data-text-size="xlarge"] {
    --law-font-size: 19px;
}

html[data-line-height="150"] {
    --law-line-height: 1.5;
}

html[data-line-height="155"] {
    --law-line-height: 1.55;
}

html[data-line-height="160"] {
    --law-line-height: 1.6;
}

html[data-line-height="165"] {
    --law-line-height: 1.65;
}

html[data-line-height="170"] {
    --law-line-height: 1.7;
}

html[data-line-height="175"] {
    --law-line-height: 1.75;
}

html[data-line-height="180"] {
    --law-line-height: 1.8;
}

html[data-line-height="185"] {
    --law-line-height: 1.85;
}

html[data-line-height="190"] {
    --law-line-height: 1.9;
}

html[data-line-height="195"] {
    --law-line-height: 1.95;
}

html[data-line-height="200"] {
    --law-line-height: 2;
}

html[data-line-height="205"] {
    --law-line-height: 2.05;
}

html[data-line-height="210"] {
    --law-line-height: 2.1;
}

html[data-contrast="high"] {
    --bg: #ffffff;
    --panel: #ffffff;
    --panel-2: #eef1f5;
    --ink: #000000;
    --muted: #1f2933;
    --soft: #374151;
    --line: #aeb4bd;
    --line-strong: #5f6875;
    --brand: #b0000b;
    --brand-dark: #790006;
    --law-text-weight: 400;
}

html[data-theme="dark"][data-contrast="high"] {
    --bg: #000000;
    --panel: #050505;
    --panel-2: #101318;
    --ink: #ffffff;
    --muted: #e5e7eb;
    --soft: #d1d5db;
    --line: #6b7280;
    --line-strong: #9ca3af;
    --brand: #ff6b72;
    --brand-dark: #ff9ba0;
}

html[data-bg-tint="warm"] {
    --bg: #fff8ea;
    --panel: #fffdf8;
    --panel-2: #f7efdf;
}

html[data-bg-tint="mint"] {
    --bg: #f2fbf5;
    --panel: #fbfffc;
    --panel-2: #e9f5ee;
}

html[data-bg-tint="blue"] {
    --bg: #f1f7ff;
    --panel: #fbfdff;
    --panel-2: #e9f1fb;
}

html[data-theme="dark"][data-bg-tint="warm"] {
    --bg: #17130e;
    --panel: #1d1913;
    --panel-2: #272116;
}

html[data-theme="dark"][data-bg-tint="mint"] {
    --bg: #0e1714;
    --panel: #131d1a;
    --panel-2: #182720;
}

html[data-theme="dark"][data-bg-tint="blue"] {
    --bg: #0d141d;
    --panel: #121a25;
    --panel-2: #182536;
}

html[data-contrast="high"][data-bg-tint],
html[data-theme="dark"][data-contrast="high"][data-bg-tint] {
    --panel: var(--bg);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    font-size: 14.5px;
    line-height: 1.65;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.topbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    width: 100%;
    max-width: 100vw;
    height: var(--topbar);
    display: grid;
    grid-template-columns: 154px minmax(150px, 1fr) minmax(260px, 500px) 38px;
    gap: 16px;
    align-items: center;
    padding: 0 18px;
    background: color-mix(in srgb, var(--panel) 94%, transparent);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.brand {
    display: flex;
    align-items: center;
    min-width: 0;
}

.brand img {
    width: 140px;
    max-width: 100%;
    height: auto;
    display: block;
}

.topbar__meta {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 10px;
    white-space: nowrap;
}

.topbar__meta span {
    color: var(--soft);
    font-size: 12px;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.topbar__meta strong {
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-search {
    height: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
}

.top-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
}

.icon-btn {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    color: var(--ink);
    background: var(--panel);
    cursor: pointer;
}

.moon,
html[data-theme="dark"] .sun {
    display: none;
}

html[data-theme="dark"] .moon {
    display: inline;
}

.sidebar {
    position: fixed;
    z-index: 20;
    inset: var(--topbar) auto 0 0;
    width: var(--sidebar);
    overflow: auto;
    padding: 20px 16px 28px;
    border-right: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 70%, var(--bg));
}

.sidebar__block + .sidebar__block {
    margin-top: 26px;
}

.eyebrow,
.section-kicker {
    color: var(--soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.act-list,
.chapter-nav {
    display: grid;
    gap: 2px;
    margin-top: 10px;
}

.act-link,
.chapter-nav a {
    display: grid;
    gap: 2px;
    padding: 10px 11px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
}

.act-link.is-active {
    color: color-mix(in srgb, var(--ink) 88%, var(--soft));
    background:
        linear-gradient(90deg, rgba(130, 138, 150, .15), rgba(130, 138, 150, .055)),
        var(--panel);
    border-color: #d1d5db;
    border-left-color: #7b8491;
    border-left-width: 3px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), 0 8px 22px rgba(29, 36, 48, .045);
}

html[data-theme="dark"] .act-link.is-active {
    background:
        linear-gradient(90deg, rgba(156, 166, 181, .16), rgba(156, 166, 181, .055)),
        var(--panel);
    border-color: #3c444f;
    border-left-color: #8f99a8;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), 0 10px 24px rgba(0, 0, 0, .18);
}

.act-link span,
.chapter-nav strong {
    font-size: 14px;
    line-height: 1.25;
}

.act-link small,
.chapter-nav small,
.chapter-nav span {
    color: var(--soft);
    font-size: 12px;
    line-height: 1.35;
}

.act-link.is-active small {
    color: var(--muted);
}

.chapter-nav a {
    transition: border-color .14s ease, background .14s ease, color .14s ease;
}

.chapter-nav a:hover {
    border-color: var(--line);
    background: var(--panel);
}

.page {
    margin-left: var(--sidebar);
    padding-top: var(--topbar);
    min-height: 100vh;
}

.masthead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: end;
    padding: 26px clamp(24px, 5vw, 64px) 20px;
    color: var(--ink);
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}

.act-code {
    width: fit-content;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 11px;
    padding: 3px;
    border: 1px solid #d6d9de;
    border-radius: 8px;
    color: #3f4650;
    background:
        linear-gradient(110deg, rgba(255, 255, 255, .82), rgba(238, 240, 243, .92)),
        #f2f3f4;
    box-shadow: 0 8px 24px rgba(25, 33, 45, .06), inset 0 1px 0 rgba(255, 255, 255, .9);
    font-family: "Consolas", "Courier New", monospace;
    font-size: 12px;
    overflow: hidden;
    position: relative;
}

.act-code::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 0%, transparent 34%, rgba(255, 255, 255, .78) 48%, transparent 62%, transparent 100%);
    content: "";
    pointer-events: none;
    transform: translateX(-115%);
    display: none;
}

.act-code span {
    position: relative;
    z-index: 1;
    padding: 5px 9px;
    border: 0;
    border-radius: 5px;
    background: transparent;
}

.act-code span:first-child {
    font-weight: 800;
}

.act-code span + span {
    border-left: 1px solid #d7dbe1;
    color: #606875;
}

html[data-theme="dark"] .act-code {
    border-color: #3a414b;
    color: #e4e9ef;
    background:
        linear-gradient(110deg, rgba(32, 37, 46, .96), rgba(24, 28, 35, .98)),
        #1b2027;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .26), inset 0 1px 0 rgba(255, 255, 255, .05);
}

html[data-theme="dark"] .act-code::after {
    background: linear-gradient(110deg, transparent 0%, transparent 34%, rgba(255, 255, 255, .13) 48%, transparent 62%, transparent 100%);
}

html[data-theme="dark"] .act-code span + span {
    border-left-color: #3a414b;
    color: #aeb7c2;
}

@keyframes act-shimmer {
    0%, 52% {
        transform: translateX(-115%);
    }

    78%, 100% {
        transform: translateX(115%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .act-code::after {
        animation: none;
        display: none;
    }
}

.masthead h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(25px, 2.6vw, 34px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: 0;
}

.masthead p {
    max-width: 700px;
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 14.5px;
}

.quick-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border-top: 1px solid var(--line);
}

.quick-stat {
    min-height: auto;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: baseline;
    padding: 7px 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
}

.quick-stat strong {
    font-family: "Consolas", "Courier New", monospace;
    font-size: 17px;
    line-height: 1;
}

.quick-stat span {
    margin-top: 0;
    color: var(--soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.source-strip,
.reader-tools,
.preamble,
.chapter,
.empty-state,
.site-footer {
    width: min(1120px, calc(100% - 48px));
    margin-inline: auto;
}

.source-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 18px 0 0;
}

.source-strip span {
    padding: 0;
    border: 0;
    border-radius: 0;
    color: var(--muted);
    background: transparent;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 12px;
}

.source-strip a {
    padding: 0 0 1px;
    border-bottom: 1px solid var(--line-strong);
    color: var(--brand-dark);
    font-family: "Consolas", "Courier New", monospace;
    font-size: 12px;
}

.reader-tools {
    position: sticky;
    top: var(--topbar);
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
    padding: 10px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(10px);
    box-shadow: none;
}

html[data-contrast="high"] .reader-tools {
    border-top-color: var(--line-strong);
    border-bottom-color: var(--line-strong);
    background: var(--bg);
    backdrop-filter: none;
}

.reader-tools strong {
    font-family: "Consolas", "Courier New", monospace;
    font-size: 17px;
}

.reader-tools span {
    color: var(--muted);
}

.tool-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.reader-mode-controls,
.text-size-controls,
.contrast-controls,
.tint-controls {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 5px;
}

.reader-mode-controls {
    border-color: var(--line-strong);
}

.tool-actions button {
    min-height: 30px;
    padding: 4px 8px;
    border: 1px solid var(--line);
    border-radius: 5px;
    color: var(--ink);
    background: transparent;
    cursor: pointer;
}

.tool-actions button[aria-pressed="true"] {
    border-color: color-mix(in srgb, var(--brand) 60%, var(--line));
    color: var(--brand-dark);
    background: color-mix(in srgb, var(--brand) 9%, transparent);
}

html[data-contrast="high"] .tool-actions button[aria-pressed="true"] {
    border-color: var(--brand-dark);
    color: #ffffff;
    background: var(--brand-dark);
}

html[data-theme="dark"][data-contrast="high"] .tool-actions button[aria-pressed="true"] {
    color: #000000;
    background: var(--brand-dark);
}

.reader-mode-controls button,
.contrast-controls button,
.tint-controls button {
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
}

.reader-mode-controls button:last-child,
.contrast-controls button:last-child,
.tint-controls button:last-child {
    border-right: 0;
}

.reader-mode-controls button[data-reading-mode-option="focus"]::before {
    display: inline-block;
    width: 24px;
    height: 7px;
    margin-right: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, #bf2447, #ba6a00, #14805e, #2877b8, #6b55ba);
    content: "";
    vertical-align: .08em;
}

.reading-mode-note {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    clip: rect(0 0 0 0);
    overflow: hidden;
    white-space: nowrap;
}

.line-height-control {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 9px;
    border: 1px solid var(--line);
    border-radius: 5px;
    color: var(--muted);
}

.line-height-control span {
    color: inherit;
    font-size: 12px;
    line-height: 1;
}

.line-height-control input {
    width: 112px;
    accent-color: var(--brand);
}

.tint-controls button {
    position: relative;
    padding-left: 24px;
}

.tint-controls button::before {
    position: absolute;
    left: 8px;
    top: 50%;
    width: 10px;
    height: 10px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: #fff;
    content: "";
    transform: translateY(-50%);
}

.tint-controls [data-bg-tint="warm"]::before {
    background: #fff1cf;
}

.tint-controls [data-bg-tint="mint"]::before {
    background: #dff4e7;
}

.tint-controls [data-bg-tint="blue"]::before {
    background: #dcecff;
}

html[data-theme="dark"] .tint-controls [data-bg-tint="default"]::before {
    background: #14171d;
}

.text-size-controls button {
    min-width: 34px;
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
    font-family: Georgia, "Times New Roman", serif;
}

.text-size-controls button:last-child {
    border-right: 0;
}

.preamble {
    margin-top: 22px;
    padding: 0 0 0 16px;
    border-left: 2px solid var(--line-strong);
    background: transparent;
}

.preamble h2 {
    margin: 3px 0 10px;
    font-size: 22px;
    line-height: 1.15;
}

.preamble .law-text {
    margin: 0;
    color: var(--muted);
}

.sections {
    padding: 14px 0 34px;
}

.chapter {
    scroll-margin-top: 100px;
    margin-top: 30px;
}

.chapter-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 8px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--line);
}

.chapter-heading span,
.chapter-heading small {
    color: var(--soft);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.chapter-heading h2 {
    margin: 3px 0 0;
    font-size: 22px;
    line-height: 1.12;
}

.section-card {
    scroll-margin-top: 124px;
    margin-top: 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    overflow: visible;
    background: transparent;
    box-shadow: none;
}

html[data-contrast="high"] .section-card {
    border-bottom-color: var(--line-strong);
}

.section-card[hidden] {
    display: none;
}

.chapter[data-accent="red"] .section-card {
    box-shadow: inset 1px 0 0 var(--line-strong);
}

.chapter[data-accent="gold"] .section-card {
    box-shadow: inset 1px 0 0 var(--line-strong);
}

.chapter[data-accent="teal"] .section-card {
    box-shadow: inset 1px 0 0 var(--line-strong);
}

.chapter[data-accent="indigo"] .section-card {
    box-shadow: inset 1px 0 0 var(--line-strong);
}

summary {
    min-height: 62px;
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr) 28px;
    gap: 12px;
    align-items: center;
    padding: 12px 0 12px 14px;
    cursor: pointer;
    list-style: none;
}

summary::-webkit-details-marker {
    display: none;
}

.sec-no {
    display: inline-grid;
    place-items: center;
    min-height: 28px;
    border: 0;
    border-radius: 0;
    color: #737b86;
    background: transparent;
    font-family: "Consolas", "Courier New", monospace;
    font-weight: 800;
}

html[data-contrast="high"] .sec-no,
html[data-contrast="high"] details[open] .open-mark {
    color: var(--ink);
}

.sec-title {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.sec-title strong {
    font-size: 16px;
    line-height: 1.25;
}

.open-mark {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 0;
    color: var(--muted);
    transition: transform .14s ease, color .14s ease;
}

details[open] .open-mark {
    transform: rotate(45deg);
    color: #737b86;
}

.section-body {
    border-top: 1px dashed var(--line);
    padding: 10px 0 14px 82px;
}

.section-body .law-text {
    max-width: 880px;
}

.section-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 8px;
}

.copy-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 6px;
}

.copy-btn {
    flex: 0 0 auto;
    min-height: 26px;
    padding: 3px 9px;
    border: 1px solid #dc2626;
    border-radius: 5px;
    color: #dc2626;
    background: transparent;
    cursor: pointer;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 11px;
    transition: border-color .14s ease, color .14s ease, background .14s ease;
}

.copy-btn:hover,
.copy-btn.is-copied {
    border-color: #b91c1c;
    color: #ffffff;
    background: #dc2626;
}

.xref-section {
    color: #48505a;
    border-bottom: 1px solid #c7ccd3;
    text-decoration: none;
}

html[data-theme="dark"] .xref-section {
    color: #c8d0da;
    border-bottom-color: #58616d;
}

html[data-contrast="high"] .xref-section {
    color: var(--brand-dark);
    border-bottom-color: currentColor;
}

.xref-section {
    padding: 0 1px;
    font-weight: 600;
}

.xref-section:hover,
.xref-section:focus {
    background: var(--panel-2);
    outline: 0;
}

.law-text {
    color: var(--ink);
    font-size: var(--law-font-size);
    font-weight: var(--law-text-weight);
    line-height: var(--law-line-height);
}

.law-line {
    --line-indent: 0px;
    margin: 0 0 11px;
    padding-left: var(--line-indent);
    overflow-wrap: break-word;
}

.law-section-heading {
    margin: 0 0 13px;
    color: color-mix(in srgb, var(--ink) 90%, var(--brand));
    font-weight: 800;
    line-height: 1.5;
}

.law-clause {
    margin-top: 13px;
}

.law-subclause,
.law-item {
    margin-bottom: 8px;
}

.law-note {
    margin: 6px 0 8px;
    padding: 5px 0 5px 12px;
    border-left: 2px solid var(--line-strong);
    color: var(--muted);
    font-size: .92em;
    line-height: 1.5;
}

.law-defined-ref {
    position: relative;
    border-bottom: 1px dotted var(--soft);
    cursor: help;
}

html[data-contrast="high"] .law-defined-ref {
    border-bottom-color: currentColor;
    border-bottom-style: solid;
}

.law-defined-ref:focus {
    outline: 1px solid var(--line-strong);
    outline-offset: 2px;
}

.definition-popover {
    position: absolute;
    z-index: 80;
    left: 0;
    bottom: calc(100% + 7px);
    width: min(340px, calc(100vw - 34px));
    padding: 8px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    color: var(--ink);
    background: var(--panel);
    box-shadow: 0 10px 28px rgba(17, 24, 39, .14);
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    white-space: normal;
}

.law-defined-ref:hover,
.law-defined-ref:focus {
    z-index: 30;
}

.law-defined-ref:hover .definition-popover,
.law-defined-ref:focus .definition-popover {
    opacity: 1;
    visibility: visible;
}

html[data-theme="dark"] .definition-popover {
    box-shadow: 0 14px 32px rgba(0, 0, 0, .34);
}

html[data-reading-mode="focus"] .law-text {
    --beeline-a: #b91c38;
    --beeline-b: #2468a9;
    line-height: var(--law-line-height);
}

html[data-theme="dark"][data-reading-mode="focus"] .law-text {
    --beeline-a: #ff8a9c;
    --beeline-b: #9fd1ff;
}

html[data-reading-mode="focus"] .law-line {
    position: relative;
    padding-left: calc(var(--line-indent) + 12px);
    color: var(--ink);
    background: transparent;
}

html[data-reading-mode="focus"] .law-line::before {
    position: absolute;
    top: .28em;
    bottom: .36em;
    left: var(--line-indent);
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--beeline-a), var(--beeline-b));
    content: "";
    opacity: .6;
}

html[data-reading-mode="focus"] .law-line:nth-of-type(5n + 2) {
    --beeline-a: #9d5400;
    --beeline-b: #126f50;
}

html[data-reading-mode="focus"] .law-line:nth-of-type(5n + 3) {
    --beeline-a: #126f50;
    --beeline-b: #654fb3;
}

html[data-reading-mode="focus"] .law-line:nth-of-type(5n + 4) {
    --beeline-a: #2468a9;
    --beeline-b: #b91c38;
}

html[data-reading-mode="focus"] .law-line:nth-of-type(5n) {
    --beeline-a: #654fb3;
    --beeline-b: #b96300;
}

html[data-theme="dark"][data-reading-mode="focus"] .law-line:nth-of-type(5n + 2) {
    --beeline-a: #ffbd76;
    --beeline-b: #85e0bd;
}

html[data-theme="dark"][data-reading-mode="focus"] .law-line:nth-of-type(5n + 3) {
    --beeline-a: #85e0bd;
    --beeline-b: #c4b5fd;
}

html[data-theme="dark"][data-reading-mode="focus"] .law-line:nth-of-type(5n + 4) {
    --beeline-a: #9fd1ff;
    --beeline-b: #ff8a9c;
}

html[data-theme="dark"][data-reading-mode="focus"] .law-line:nth-of-type(5n) {
    --beeline-a: #c4b5fd;
    --beeline-b: #ffc078;
}

html[data-reading-mode="focus"] .law-line *:not(.definition-popover):not(.focus-word),
html[data-reading-mode="focus"] .xref-section {
    color: inherit;
}

html[data-reading-mode="focus"] .focus-word--0 {
    color: #b91c38;
}

html[data-reading-mode="focus"] .focus-word--1 {
    color: #a95500;
}

html[data-reading-mode="focus"] .focus-word--2 {
    color: #7c6a00;
}

html[data-reading-mode="focus"] .focus-word--3 {
    color: #14784f;
}

html[data-reading-mode="focus"] .focus-word--4 {
    color: #1767a6;
}

html[data-reading-mode="focus"] .focus-word--5 {
    color: #4f55b4;
}

html[data-reading-mode="focus"] .focus-word--6 {
    color: #8b3fa4;
}

html[data-theme="dark"][data-reading-mode="focus"] .focus-word--0 {
    color: #ff8a9c;
}

html[data-theme="dark"][data-reading-mode="focus"] .focus-word--1 {
    color: #ffbd76;
}

html[data-theme="dark"][data-reading-mode="focus"] .focus-word--2 {
    color: #f4df7a;
}

html[data-theme="dark"][data-reading-mode="focus"] .focus-word--3 {
    color: #85e0bd;
}

html[data-theme="dark"][data-reading-mode="focus"] .focus-word--4 {
    color: #9fd1ff;
}

html[data-theme="dark"][data-reading-mode="focus"] .focus-word--5 {
    color: #b8c0ff;
}

html[data-theme="dark"][data-reading-mode="focus"] .focus-word--6 {
    color: #e9b4ff;
}

html[data-reading-mode="focus"] .law-hit {
    border-bottom-color: color-mix(in srgb, currentColor 42%, transparent);
    background-color: transparent;
}

html[data-reading-mode="focus"] .definition-popover {
    color: var(--ink);
}

.read-word__lead {
    font-weight: inherit;
}

html[data-reading-mode="fast"] .law-text {
    line-height: var(--law-line-height);
}

html[data-reading-mode="fast"] .read-word__lead {
    color: color-mix(in srgb, var(--ink) 92%, var(--brand));
    font-weight: 800;
}

html[data-reading-mode="fast"] .law-line {
    letter-spacing: .005em;
}

.law-spacer {
    height: 8px;
}

.law-indent-1 {
    --line-indent: 24px;
}

.law-indent-2 {
    --line-indent: 48px;
}

.law-indent-3 {
    --line-indent: 72px;
}

.law-illustration-label {
    margin: 18px 0 8px;
    padding-left: 0;
    text-align: center;
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    font-weight: 700;
}

.law-explanation {
    margin-top: 12px;
    padding-left: calc(var(--line-indent) + 12px);
    border-left: 2px solid var(--line-strong);
    font-style: italic;
}

.law-proviso {
    margin-top: 12px;
    padding-left: calc(var(--line-indent) + 12px);
    border-left: 2px solid color-mix(in srgb, var(--brand) 35%, var(--line-strong));
}

.law-schedule-title,
.law-schedule-note {
    padding-left: 0;
    text-align: center;
}

.law-schedule-title {
    margin-top: 4px;
    font-weight: 800;
}

.law-schedule-note {
    color: var(--muted);
    font-style: italic;
}

.law-table-row {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) minmax(150px, 220px);
    border: 1px solid var(--line);
    border-bottom: 0;
    font-size: 14px;
}

.law-table-row:last-child {
    border-bottom: 1px solid var(--line);
}

.law-table-row.is-header {
    color: var(--ink);
    background: var(--panel-2);
    font-weight: 700;
}

.law-table-cell {
    padding: 9px 10px;
    border-right: 1px solid var(--line);
}

.law-table-cell:last-child {
    border-right: 0;
}

.section-copy-source {
    display: none;
}

.empty-state {
    margin-top: 20px;
    padding: 24px;
    border: 1px dashed var(--line-strong);
    border-radius: 6px;
    background: transparent;
    text-align: center;
}

.empty-state h2 {
    margin: 0 0 6px;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    padding: 28px 0 40px;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

.site-footer strong {
    color: var(--brand);
}

.home-shell {
    min-height: 100vh;
    background: #ffffff;
}

.home-topbar {
    position: fixed;
    top: 0;
    inset-inline: 0;
    z-index: 50;
    height: var(--topbar);
    display: grid;
    grid-template-columns: 38px;
    justify-content: end;
    gap: 16px;
    align-items: center;
    padding: 0 52px;
    background: transparent;
    border-bottom: 0;
    backdrop-filter: none;
}

.home-page {
    width: min(1360px, calc(100% - 80px));
    margin: 0 auto;
    padding: calc(var(--topbar) + 44px) 0 64px;
}

.home-kicker {
    display: block;
    margin-bottom: 18px;
    color: rgba(23, 23, 23, .56);
    font-family: "Consolas", "Courier New", monospace;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

html[data-theme="dark"] .home-shell {
    background: #0f1115;
}

html[data-theme="dark"] .home-kicker {
    color: rgba(241, 243, 245, .66);
}

.home-composition {
    position: relative;
    min-height: calc(100vh - var(--topbar) - 126px);
    display: grid;
    grid-template-columns: minmax(440px, 1fr) minmax(340px, 420px);
    gap: clamp(34px, 6vw, 90px);
    align-items: center;
    padding: 24px 0 40px;
}

.home-composition::before {
    position: absolute;
    inset: auto 0 8%;
    height: 1px;
    background: rgba(20, 20, 20, .18);
    content: "";
}

.home-logo-stage {
    position: relative;
    z-index: 6;
    min-height: min(62vw, 660px);
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 20px;
}

.home-logo-stage .home-kicker {
    margin: 0;
}

.home-logo-motion {
    position: relative;
    width: min(42vw, 480px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    overflow: visible;
}

.home-logo-motion::before {
    display: none;
}

.home-logo-motion::after {
    display: none;
}

.home-logo-mark {
    position: relative;
    z-index: 2;
    width: min(190px, 44%);
    display: block;
    overflow: hidden;
    animation: logo-breathe 5.4s ease-in-out infinite;
}

.home-logo-mark img {
    width: 100%;
    height: auto;
    display: block;
}

.home-logo-mark span {
    position: absolute;
    z-index: 3;
    inset: 0;
    background: linear-gradient(105deg, transparent 0%, transparent 42%, rgba(255, 255, 255, .55) 48%, transparent 56%, transparent 100%);
    pointer-events: none;
    transform: translateX(-120%);
    animation: logo-scan 4.8s ease-in-out infinite;
}

@keyframes logo-breathe {
    0%, 100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-6px) scale(1.015);
    }
}

@keyframes logo-scan {
    0%, 55% {
        transform: translateX(-120%);
    }

    85%, 100% {
        transform: translateX(120%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-logo-motion,
    .home-logo-motion::before,
    .home-logo-mark,
    .home-logo-mark span,
    .home-map__grid,
    .home-map__track,
    .home-map__node {
        animation: none;
    }

    .home-logo-mark span {
        display: none;
    }
}

.home-map {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.home-map__grid {
    fill: none;
    stroke: rgba(20, 20, 20, .09);
    stroke-width: 1;
}

.home-map__track {
    fill: none;
    stroke: rgba(201, 31, 38, .58);
    stroke-width: 1.6;
    stroke-linecap: square;
    stroke-linejoin: miter;
    stroke-dasharray: 30 90;
    animation: map-flow 4.8s linear infinite;
}

.home-map__track--soft {
    stroke: rgba(20, 20, 20, .22);
    stroke-width: 1.2;
    stroke-dasharray: 16 52;
    animation-duration: 7.2s;
}

.home-map__node {
    fill: #fff;
    stroke: rgba(20, 20, 20, .36);
    stroke-width: 1.5;
    transform-box: fill-box;
    transform-origin: center;
    animation: node-pulse 5.8s ease-in-out infinite;
}

.home-map__node:nth-of-type(2n) {
    animation-delay: -.9s;
}

.home-map__node--red {
    fill: var(--brand);
    stroke: var(--brand);
    animation-duration: 3s;
}

@keyframes map-flow {
    to {
        stroke-dashoffset: -120;
    }
}

@keyframes node-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: .72;
    }

    50% {
        transform: scale(1.26);
        opacity: 1;
    }
}

.reader-board {
    position: relative;
    z-index: 6;
    align-self: center;
    display: grid;
    gap: 10px;
}

.reader-board__label {
    margin-bottom: 8px;
    color: rgba(23, 23, 23, .55);
    font-family: "Consolas", "Courier New", monospace;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.reader-tile {
    position: relative;
    min-height: 106px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 15px 16px;
    border: 1px solid rgba(20, 20, 20, .18);
    border-radius: 8px;
    background: rgba(255, 255, 255, .24);
    overflow: hidden;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.reader-tile::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--brand);
    content: "";
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform .16s ease;
}

.reader-tile:hover {
    border-color: rgba(20, 20, 20, .34);
    background: rgba(255, 255, 255, .38);
    transform: translateX(-6px);
}

.reader-tile:hover::before {
    transform: scaleY(1);
}

.reader-tile__no {
    color: rgba(23, 23, 23, .45);
    font-family: "Consolas", "Courier New", monospace;
    font-size: 13px;
}

.reader-tile__body {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.reader-tile__body strong {
    color: #181818;
    font-size: 24px;
    line-height: 1;
}

.reader-tile__body small {
    color: rgba(23, 23, 23, .68);
    font-size: 12.5px;
    line-height: 1.35;
}

.reader-tile__open {
    align-self: start;
    color: var(--brand-dark);
    font-family: "Consolas", "Courier New", monospace;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

html[data-theme="dark"] .reader-tile__body strong {
    color: var(--ink);
}

html[data-theme="dark"] .home-map__track--soft {
    stroke: rgba(241, 243, 245, .22);
}

html[data-theme="dark"] .home-map__grid {
    stroke: rgba(241, 243, 245, .1);
}

html[data-theme="dark"] .home-map__track {
    stroke: rgba(240, 82, 89, .66);
}

html[data-theme="dark"] .home-map__node {
    fill: #0f1115;
    stroke: rgba(241, 243, 245, .52);
}

html[data-theme="dark"] .home-map__node--red {
    fill: var(--brand);
    stroke: var(--brand);
}

html[data-theme="dark"] .reader-board__label,
html[data-theme="dark"] .reader-tile__no,
html[data-theme="dark"] .reader-tile__body small {
    color: rgba(241, 243, 245, .68);
}

html[data-theme="dark"] .reader-tile {
    border-color: rgba(241, 243, 245, .16);
    background: rgba(255, 255, 255, .04);
}

html[data-theme="dark"] .reader-tile:hover {
    border-color: rgba(241, 243, 245, .32);
    background: rgba(255, 255, 255, .075);
}

mark {
    padding: 0 2px;
    border-radius: 3px;
    color: inherit;
    background: color-mix(in srgb, var(--gold) 34%, transparent);
}

@media (max-width: 1080px) {
    :root {
        --sidebar: 278px;
    }

    .topbar {
        grid-template-columns: 150px minmax(120px, 1fr) minmax(210px, 380px) 42px;
        gap: 12px;
    }

    .brand img {
        width: 132px;
    }

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

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

    .home-composition {
        grid-template-columns: 1fr;
        align-items: center;
    }

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

    .reader-board__label {
        grid-column: 1 / -1;
    }

    .reader-tile {
        min-height: 112px;
    }
}

@media (max-width: 840px) {
    :root {
        --sidebar: 0px;
        --topbar: 108px;
    }

    .topbar {
        height: var(--topbar);
        grid-template-columns: minmax(0, 1fr) 38px;
        grid-template-areas:
            "brand theme"
            "search search";
        gap: 8px 10px;
        align-content: center;
        padding: 10px 12px;
        overflow: hidden;
    }

    .home-topbar {
        height: 72px;
        grid-template-columns: 38px;
        justify-content: end;
        padding: 10px 12px;
    }

    .home-topbar .topbar__meta {
        display: none;
    }

    .home-topbar .icon-btn {
        grid-area: auto;
    }

    .home-topbar .icon-btn {
        justify-self: end;
    }

    .home-page {
        width: min(100% - 28px, 1180px);
        padding-top: 94px;
    }

    .home-composition {
        grid-template-columns: 1fr;
        gap: 22px;
        min-height: auto;
        padding-top: 8px;
    }

    .home-composition::before {
        display: none;
    }

    .home-logo-stage {
        min-height: 340px;
        gap: 16px;
        justify-items: center;
    }

    .home-logo-motion {
        width: min(82vw, 340px);
    }

    .home-logo-mark {
        width: min(170px, 44%);
    }

    .reader-board {
        grid-template-columns: 1fr;
        margin-top: 8px;
    }

    .reader-tile {
        grid-template-columns: 40px minmax(0, 1fr);
        min-height: 104px;
    }

    .reader-tile__open {
        grid-column: 2;
    }

    .brand img {
        width: min(128px, calc(100vw - 76px));
    }

    .topbar__meta {
        display: none;
    }

    .top-search {
        grid-area: search;
        width: 100%;
        min-width: 0;
        height: 36px;
    }

    .icon-btn {
        grid-area: theme;
        justify-self: end;
        width: 38px;
        height: 38px;
    }

    .sidebar {
        display: none;
    }

    .page {
        margin-left: 0;
    }

    .masthead {
        padding: 20px 16px 18px;
    }

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

    .source-strip,
    .reader-tools,
    .preamble,
    .chapter,
    .empty-state,
    .site-footer {
        width: min(100% - 28px, 1120px);
    }

    .reader-tools {
        position: static;
        align-items: stretch;
        flex-direction: column;
    }

    .tool-actions {
        width: 100%;
    }

    .reader-mode-controls,
    .contrast-controls,
    .tint-controls,
    .line-height-control {
        width: 100%;
    }

    .tool-actions button {
        flex: 1;
    }

    .line-height-control input {
        flex: 1;
        width: auto;
    }

    summary {
        grid-template-columns: 62px minmax(0, 1fr) 28px;
        gap: 10px;
        padding: 14px;
    }

    .section-body {
        padding: 15px;
    }

    .section-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .copy-actions {
        flex-wrap: wrap;
    }

    .law-indent-1 {
        --line-indent: 18px;
    }

    .law-indent-2 {
        --line-indent: 32px;
    }

    .law-indent-3 {
        --line-indent: 46px;
    }

    .law-table-row {
        grid-template-columns: 54px minmax(0, 1fr);
    }

    .law-table-cell:nth-child(3) {
        grid-column: 1 / -1;
        border-top: 1px solid var(--line);
        border-right: 0;
    }
}

@media (max-width: 520px) {
    :root {
        --topbar: 104px;
    }

    .topbar {
        padding-inline: 10px;
    }

    .brand img {
        width: min(118px, calc(100vw - 68px));
    }

    .masthead h1 {
        font-size: 25px;
    }

    .masthead p {
        font-size: 14.5px;
    }

    .quick-panel {
        grid-template-columns: 1fr;
    }

    .quick-stat {
        min-height: auto;
    }

    .quick-stat strong {
        font-size: 17px;
    }

    .source-strip span {
        width: 100%;
    }

    summary {
        grid-template-columns: 1fr 28px;
    }

    .sec-no {
        width: fit-content;
    }

    .sec-title {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .open-mark {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }
}
