body:has(.law-page) {
    background: #e6e0d4;
}

.law-page {
    padding: 2.25rem 1.1rem 4.5rem;
    background:
        radial-gradient(ellipse at 0% 0%, rgba(140, 42, 36, 0.08), transparent 36%),
        linear-gradient(180deg, #efe8dc 0%, #e4ddd0 100%);
    color: #1c1612;
}

.law-doc {
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 196px minmax(0, 1fr);
    gap: 1.35rem;
    align-items: start;
}

.law-toc[hidden] {
    display: none;
}

.law-doc:has(.law-toc[hidden]) {
    grid-template-columns: minmax(0, 1fr);
}

.law-toc {
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 110px);
    overflow: auto;
    padding: 0.2rem 0.15rem 0.2rem 0;
}

.law-toc p {
    margin: 0 0 0.55rem;
    color: #8c2a24;
    font-family: "Songti SC", "Noto Serif SC", "STSong", "PMingLiU", serif;
    font-size: 12px;
    letter-spacing: 0.42em;
}

.law-toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
    border-left: 1px solid rgba(140, 42, 36, 0.35);
}

.law-toc a {
    display: block;
    padding: 0.38rem 0 0.38rem 0.75rem;
    color: #5e564c;
    font-family: "Songti SC", "Noto Serif SC", "STSong", serif;
    font-size: 13px;
    line-height: 1.45;
    text-decoration: none;
}

.law-toc a:hover,
.law-toc a:focus {
    color: #8c2a24;
}

.law-sheet {
    position: relative;
    min-width: 0;
    padding: 2.35rem 2.7rem 2.8rem;
    background:
        linear-gradient(180deg, rgba(255, 252, 246, 0.55), rgba(255, 252, 246, 0) 120px),
        #fbf7f0;
    border: 1px solid #d5cbbd;
    box-shadow: 0 22px 50px rgba(48, 32, 18, 0.08);
}

.law-sheet::before {
    content: "";
    position: absolute;
    inset: 9px;
    border: 1px solid rgba(140, 42, 36, 0.28);
    pointer-events: none;
}

.law-mast {
    position: relative;
    margin: 0 0.4rem 1.35rem;
    padding: 0.15rem 0.6rem 1.15rem;
    text-align: center;
    border-bottom: 3px double #8c2a24;
}

.law-kicker {
    color: #8c2a24;
    font-family: "Songti SC", "Noto Serif SC", "STSong", serif;
    font-size: 12px;
    letter-spacing: 0.38em;
}

.law-mast h1 {
    margin: 0.45rem 0 0.35rem;
    color: #1c1612;
    font-family: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
    font-size: 2.15rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.25;
}

.law-meta,
.law-parties {
    margin: 0.35rem 0 0;
    color: #6d6458;
    font-size: 12px;
    letter-spacing: 0.04em;
}

.law-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem 1.1rem;
}

.law-body {
    position: relative;
    font-family: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", "PMingLiU", serif;
    font-size: 16.5px;
    line-height: 2;
}

.law-body .paddingLeft2 a {
    color: #8c2a24;
    font-weight: 700;
    text-decoration: none;
}

.law-body .paddingLeft2 a:hover {
    text-decoration: underline;
}

.law-body .content-title,
.law-body .law-chapter {
    margin: 1.85rem 0 0.7rem;
    padding: 0;
    border: 0;
    color: #1c1612;
    background: transparent;
    font-family: "Songti SC", "Noto Serif SC", "STSong", serif;
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1.5;
    text-align: center;
    scroll-margin-top: 96px;
}

.law-body .linestyle,
.law-body .law-clause,
.law-body p {
    margin: 0.42em 0;
    color: #241c16;
}

.law-body .linestyle {
    text-indent: 2em;
}

.law-body .paddingLeft1,
.law-body .paddingLeft2,
.law-body .paddingLeft2 div {
    text-indent: 0;
    padding-left: 2em;
}

.law-body .law-clause,
.law-body p {
    text-indent: 2em !important;
}

.law-body .law-bind,
.law-body .law-related,
.law-body .law-form,
.law-body .law-form p,
.law-body .law-form label {
    text-indent: 0 !important;
}

.law-body b,
.law-body strong {
    font-weight: 700;
}

.law-body .law-bind,
.law-body .law-related {
    text-indent: 0;
}

.law-bind {
    margin: 0 0 1rem;
    padding: 0.75rem 0.95rem 0.75rem 1rem;
    border-left: 3px solid #8c2a24;
    background: rgba(140, 42, 36, 0.05);
    color: #3d342c;
    font-size: 14px;
    line-height: 1.85;
    text-indent: 0;
}

.law-bind a,
.law-related a {
    color: #8c2a24;
    font-weight: 700;
    text-decoration: none;
}

.law-bind a:hover,
.law-related a:hover {
    text-decoration: underline;
}

.law-related {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.9rem;
    margin: 0 0 1.15rem;
    text-indent: 0;
}

.law-related a {
    font-size: 13px;
    letter-spacing: 0.02em;
}

.law-related a.is-current {
    color: #1c1612;
    pointer-events: none;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.law-form {
    margin-top: 2rem;
    padding: 1.15rem 1.15rem 1rem;
    border: 1px solid #e3d5c4;
    background: #fffdf8;
    line-height: 1.5;
    font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.law-form,
.law-form p,
.law-form label,
.law-form span,
.law-form em,
.law-form small {
    text-indent: 0 !important;
    letter-spacing: 0;
}

.law-form-head h2 {
    margin: 0;
    color: #1c1612;
    font-family: "Songti SC", "Noto Serif SC", "STSong", serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.4;
    text-align: left;
}

.law-form-head p {
    margin: 0.35rem 0 0.95rem;
    color: #6d6458;
    font-size: 13px;
    line-height: 1.7;
}

.law-form-head a {
    color: #8c2a24;
    font-weight: 600;
    text-decoration: none;
}

.law-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem 0.9rem;
}

.law-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
    margin: 0;
}

.law-field-full {
    grid-column: 1 / -1;
}

.law-field > span {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    color: #3d342c;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.law-field > span i {
    color: #8a7d70;
    font-style: normal;
    font-size: 12px;
    font-weight: 500;
}

.law-form input[type="text"],
.law-form select,
.law-form textarea {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0.62rem 0.75rem;
    border: 1px solid #ddcfc0;
    border-radius: 2px;
    background: #fff;
    color: #1c1612;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
}

.law-form textarea {
    min-height: 0;
    resize: vertical;
}

.law-form input[type="file"] {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0.45rem 0.55rem;
    border: 1px dashed #ddcfc0;
    border-radius: 2px;
    background: #fff;
    color: #5e564c;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.4;
}

.law-field small {
    color: #8a7d70;
    font-size: 12px;
    line-height: 1.4;
}

.law-choices {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
}

.law-choices label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    margin: 0;
    padding: 0.55rem 0.6rem;
    border: 1px solid #e3d5c4;
    background: #fff;
    color: #3d342c;
    font-size: 13px;
    line-height: 1.3;
    cursor: pointer;
}

.law-choices input {
    margin: 0;
    accent-color: #8c2a24;
}

.law-choices em {
    font-style: normal;
    white-space: nowrap;
}

.law-choices label:has(input:checked) {
    border-color: #8c2a24;
    background: rgba(140, 42, 36, 0.06);
    color: #8c2a24;
}

.law-form-foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem 1rem;
    align-items: center;
    margin-top: 0.95rem;
    padding-top: 0.9rem;
    border-top: 1px solid #efe4d6;
}

.law-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0;
    color: #3d342c;
    font-size: 13px;
    line-height: 1.6;
}

.law-check input {
    margin: 0.25rem 0 0;
    accent-color: #8c2a24;
}

.law-form button {
    min-width: 132px;
    height: 40px;
    padding: 0 1.1rem;
    border: 1px solid #8c2a24;
    background: #8c2a24;
    color: #fffaf3;
    font-family: "Songti SC", "Noto Serif SC", "STSong", serif;
    font-size: 15px;
    letter-spacing: 0.16em;
    cursor: pointer;
}

.law-form button:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.law-form .law-result {
    grid-column: 1 / -1;
    min-height: 0;
    margin: 0;
    color: #8c2a24;
    font-size: 13px;
    line-height: 1.6;
}

.law-form .law-result:empty {
    display: none;
}

@media (max-width: 860px) {
    .law-doc {
        grid-template-columns: 1fr;
    }

    .law-toc {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .law-toc ol {
        display: flex;
        gap: 0.2rem 0.8rem;
        overflow: auto;
        border-left: 0;
        border-bottom: 1px solid rgba(140, 42, 36, 0.35);
    }

    .law-toc a {
        white-space: nowrap;
        padding-left: 0;
    }

    .law-sheet {
        padding: 1.4rem 1rem 1.8rem;
    }

    .law-mast h1 {
        font-size: 1.55rem;
        letter-spacing: 0.08em;
    }

    .law-body {
        font-size: 15.5px;
    }

    .law-grid,
    .law-choices,
    .law-form-foot {
        grid-template-columns: 1fr;
    }

    .law-choices {
        grid-template-columns: 1fr 1fr;
    }
}
