.law-hero {
    padding: 2.75rem 0 1.5rem;
}

.law-hero-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.15rem;
}

.law-hero-copy {
    min-width: 0;
    width: 100%;
}

.law-hero h1 {
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--welcome-ink);
    max-width: 44rem;
    margin-bottom: 0.85rem;
}

.law-lead {
    color: var(--welcome-muted);
    max-width: 58rem;
    margin-bottom: 0;
    font-size: 1.02rem;
}

.law-hero-action {
    width: 100%;
}

.law-btn-all-quiz {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    border: 0;
    border-radius: 1.15rem;
    padding: 0.55rem 1.15rem 0.55rem 0.55rem;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    color: #fff;
    background:
        linear-gradient(135deg, #ffd36a 0%, #f4b942 38%, #ef9f1a 100%);
    box-shadow: 0 12px 26px rgba(239, 159, 26, 0.32);
    transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
    animation: law-cta-glow 2.4s ease-in-out infinite;
}

.law-btn-all-quiz-icon {
    display: grid;
    place-items: center;
    width: 2.55rem;
    height: 2.55rem;
    border-radius: 0.85rem;
    background: #fff;
    color: #b45309;
    flex: 0 0 auto;
}

.law-btn-all-quiz-icon i {
    font-size: 1.2rem;
    line-height: 1;
}

.law-btn-all-quiz-text {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
}

.law-btn-all-quiz-text strong {
    font-size: 1.02rem;
    font-weight: 800;
    color: #4a2800;
    letter-spacing: -0.01em;
}

.law-btn-all-quiz-text small {
    font-size: 0.75rem;
    font-weight: 700;
    color: #7a4a08;
}

.law-btn-all-quiz:hover {
    color: #fff;
    filter: brightness(1.04);
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(239, 159, 26, 0.4);
}

@keyframes law-cta-glow {
    0%, 100% { box-shadow: 0 12px 26px rgba(239, 159, 26, 0.28); }
    50% { box-shadow: 0 16px 34px rgba(239, 159, 26, 0.48); }
}

@media (prefers-reduced-motion: reduce) {
    .law-btn-all-quiz {
        animation: none;
    }
}

.law-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--welcome-primary-deep);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.law-back:hover {
    color: var(--welcome-primary);
}

.law-list {
    padding: 0 0 4rem;
}

.law-contact-wrap {
    margin-top: 1.75rem;
}

.law-contact-wrap .welcome-contact {
    margin-top: 0;
}

.law-card {
    display: flex;
    gap: 1.15rem;
    background: #fff;
    border: 1px solid var(--welcome-line);
    border-radius: 1.25rem;
    padding: 1.25rem 1.35rem;
    box-shadow: 0 10px 24px rgba(14, 154, 168, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.law-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--welcome-shadow);
    border-color: rgba(14, 154, 168, 0.28);
}

.law-card-index {
    flex: 0 0 3.1rem;
    width: 3.1rem;
    height: 3.1rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.05rem;
    color: #fff;
    background: linear-gradient(135deg, #20c4d2 0%, #0e9aa8 100%);
}

.law-card-luat .law-card-index {
    background: linear-gradient(135deg, #20c4d2 0%, #0e9aa8 100%);
}

.law-card-nghi-dinh .law-card-index {
    background: linear-gradient(135deg, #ffd054 0%, #ef9f1a 100%);
    color: #5a3200;
}

.law-card-thong-tu .law-card-index {
    background: linear-gradient(135deg, #6db4ff 0%, #2b7de9 100%);
}

.law-card-quyet-dinh .law-card-index {
    background: linear-gradient(135deg, #b388ff 0%, #7c4dff 100%);
}

.law-card-body {
    min-width: 0;
    flex: 1;
}

.law-type {
    display: inline-flex;
    align-items: center;
    background: var(--welcome-primary-soft);
    color: var(--welcome-primary-deep);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 0.22rem 0.65rem;
    margin-bottom: 0.45rem;
}

.law-card-nghi-dinh .law-type {
    background: #fff4d4;
    color: #9a6408;
}

.law-card-thong-tu .law-type {
    background: #e7f1ff;
    color: #1d5bb8;
}

.law-card-quyet-dinh .law-type {
    background: #f1e9ff;
    color: #5b2db3;
}

.law-card h2 {
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--welcome-ink);
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.law-card p {
    color: var(--welcome-muted);
    margin-bottom: 0.95rem;
    font-size: 0.94rem;
}

.law-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.law-btn-quiz,
.law-btn-quiz-pack,
.law-btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 0;
    border-radius: 999px;
    padding: 0.58rem 1rem;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.18s ease, filter 0.18s ease;
}

.law-btn-quiz i,
.law-btn-quiz-pack i,
.law-btn-download i {
    font-size: 1rem;
    line-height: 1;
}

.law-btn-quiz {
    background: linear-gradient(135deg, #20c4d2 0%, #0e9aa8 100%);
    color: #fff;
    box-shadow: 0 8px 16px rgba(14, 154, 168, 0.22);
}

.law-btn-quiz-pack {
    background: linear-gradient(135deg, #b388ff 0%, #7c4dff 100%);
    color: #fff;
    box-shadow: 0 8px 16px rgba(124, 77, 255, 0.28);
}

.law-btn-download {
    background: linear-gradient(135deg, #ffe36a 0%, #f4b942 55%, #ef9f1a 100%);
    color: #5a3200;
    box-shadow: 0 8px 16px rgba(239, 159, 26, 0.28);
}

.law-btn-quiz:hover,
.law-btn-quiz-pack:hover,
.law-btn-download:hover {
    color: inherit;
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.law-btn-quiz:hover {
    color: #fff;
}

.law-btn-quiz-pack:hover {
    color: #fff;
}

.law-dialog {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

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

.law-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 42, 48, 0.42);
}

.law-dialog-auth-msg {
    color: var(--welcome-ink);
    font-size: 1.08rem;
    line-height: 1.55;
    margin: 0;
}

.law-dialog-card {
    position: relative;
    width: 60%;
    max-height: calc(100vh - 2rem);
    overflow: auto;
    background: #fff;
    border: 1px solid var(--welcome-line);
    border-radius: 1.35rem;
    padding: 1.5rem 1.4rem 1.35rem;
    box-shadow: 0 24px 48px rgba(14, 154, 168, 0.2);
}

.law-dialog-card-pack {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.law-dialog-pack-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.law-dialog-card-pack .law-dialog-header {
    justify-content: flex-start;
    text-align: left;
}

.law-dialog-body.law-dialog-body-pack {
    display: block;
    text-align: left;
    padding: 1.25rem 1.6rem 1.35rem;
    overflow: auto;
}

.law-dialog-footer.law-dialog-footer-pack {
    justify-content: stretch;
}

.law-dialog-footer-pack .welcome-btn-primary {
    width: 100%;
    min-width: 0;
}

.law-dialog-card-auth {
    width: min(560px, 92%);
    min-height: 280px;
    padding: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.law-dialog-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3.6rem;
    padding: 0.95rem 3.2rem 0.95rem 1.4rem;
    border-bottom: 1px solid var(--welcome-line);
    background: #f4fbfc;
}

.law-dialog-header .law-dialog-kicker {
    margin: 0;
}

.law-dialog-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 2.1rem;
}

.law-dialog-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.4rem 1.15rem;
    border-top: 1px solid var(--welcome-line);
    background: #fafefe;
}

.law-dialog-footer .welcome-btn-primary,
.law-dialog-footer .welcome-btn-ghost {
    min-width: 12.5rem;
    justify-content: center;
}

.law-dialog-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    border: 0;
    background: transparent;
    color: var(--welcome-muted);
    width: 32px;
    height: 32px;
}

.law-dialog-header .law-dialog-close {
    top: 50%;
    transform: translateY(-50%);
}

.law-dialog-kicker {
    color: var(--welcome-primary-deep);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.law-dialog-card h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.law-dialog-doc {
    color: var(--welcome-muted);
    font-size: 0.92rem;
    margin-bottom: 0.9rem;
}

.law-dialog-quote {
    background: var(--welcome-primary-soft);
    border-left: 4px solid var(--welcome-primary);
    border-radius: 0.85rem;
    padding: 0.85rem 1rem;
    color: var(--welcome-ink);
    font-weight: 600;
    font-style: italic;
    margin-bottom: 0.9rem;
}

.law-dialog-thanks {
    background: #f3fbfc;
    border: 1px solid rgba(14, 154, 168, 0.18);
    border-radius: 1rem;
    padding: 0.85rem 1rem;
    color: var(--welcome-ink);
    margin-bottom: 0.85rem;
}

.law-dialog-thanks p {
    margin: 0 0 0.55rem;
}

.law-dialog-thanks p:last-child {
    margin-bottom: 0;
}

.law-donate {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: #fff8e8;
    border: 1px solid #f3d58a;
    border-radius: 1rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
}

.law-donate-info {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
    flex: 1;
}

.law-donate-invite {
    margin: 0 0 0.15rem;
    color: #1d5bb8;
    font-size: 0.95rem;
    font-weight: 700;
    font-style: italic;
    line-height: 1.45;
    white-space: normal;
}

.law-donate-info > div {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    white-space: nowrap;
}

.law-donate-qr {
    flex: 0 0 auto;
    width: 148px;
    height: auto;
    border-radius: 0.85rem;
    background: #fff;
    border: 1px solid #f0d089;
    box-shadow: 0 6px 14px rgba(138, 90, 8, 0.08);
}

@media (max-width: 575.98px) {
    .law-donate {
        flex-direction: column;
        align-items: stretch;
    }

    .law-donate-qr {
        width: min(168px, 56%);
        margin: 0 auto;
    }
}

.law-donate span {
    color: #8a5a08;
    font-size: 0.9rem;
    font-weight: 700;
    flex: 0 0 auto;
}

.law-donate strong {
    color: var(--welcome-ink);
    font-size: 0.95rem;
}

.law-dialog-input {
    border-radius: 0.85rem;
    border-color: rgba(14, 154, 168, 0.2);
    padding: 0.7rem 0.85rem;
}

.law-dialog-error {
    color: #b42318;
    font-size: 0.86rem;
    margin: 0.55rem 0 0;
}

.law-dialog-success {
    color: #0b7a4b;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0.55rem 0 0;
}

.law-quiz-empty {
    background: #fff;
    border: 1px solid var(--welcome-line);
    border-radius: 1.5rem;
    padding: 3rem 1.5rem;
    text-align: center;
    max-width: 40rem;
    margin: 0 auto;
}

.law-quiz-empty-icon {
    font-size: 2.4rem;
    color: var(--welcome-primary);
}

.law-quiz-empty .welcome-btn-primary,
.law-quiz-empty .welcome-btn-ghost {
    padding: 0.58rem 1rem;
    font-size: 0.9rem;
}

.law-quiz-empty .welcome-btn-primary i,
.law-quiz-empty .welcome-btn-ghost i {
    font-size: 1rem;
    color: inherit;
    line-height: 1;
}

.law-quiz-empty h2 {
    margin: 1rem 0 0.5rem;
    font-size: 1.35rem;
    font-weight: 800;
}

.law-quiz-empty p {
    color: var(--welcome-muted);
    margin-bottom: 1.25rem;
}

.law-quiz-score {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    background: linear-gradient(135deg, #20c4d2 0%, #0e9aa8 100%);
    color: #fff;
    border-radius: 1.15rem;
    padding: 1rem 1.2rem;
    margin-bottom: 1.25rem;
}

.law-quiz-score strong {
    font-size: 1.7rem;
    margin-right: 0.4rem;
}

.law-quiz-score .law-btn-quiz {
    background: #fff;
    color: var(--welcome-primary-deep);
    box-shadow: none;
}

.law-question {
    background: #fff;
    border: 1px solid var(--welcome-line);
    border-radius: 1.15rem;
    padding: 1.15rem 1.25rem 1.05rem;
    margin-bottom: 0.9rem;
}

.law-question.is-correct {
    border-color: rgba(25, 135, 84, 0.35);
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.08);
}

.law-question.is-wrong {
    border-color: rgba(220, 53, 69, 0.3);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.07);
}

.law-question header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.45rem;
}

.law-question header span {
    font-weight: 800;
    color: var(--welcome-primary-deep);
}

.law-question header small {
    color: var(--welcome-muted);
}

.law-question > p {
    font-weight: 600;
    color: var(--welcome-ink);
    white-space: pre-line;
    margin-bottom: 0.85rem;
}

.law-options {
    display: grid;
    gap: 0.5rem;
}

.law-options label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    border: 1px solid var(--welcome-line);
    border-radius: 0.85rem;
    padding: 0.7rem 0.85rem;
    cursor: pointer;
    background: #fbfefe;
}

.law-options label:hover {
    border-color: rgba(14, 154, 168, 0.35);
}

.law-options label.is-answer {
    border-color: #198754;
    background: #edf8f1;
}

.law-options label.is-chosen {
    border-color: #dc3545;
    background: #fdecee;
}

.law-options input {
    margin-top: 0.2rem;
}

.law-explain {
    margin-top: 0.75rem;
    font-size: 0.92rem;
    color: var(--welcome-muted);
}

.law-quiz-actions {
    position: sticky;
    bottom: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    background: rgba(247, 252, 253, 0.94);
    backdrop-filter: blur(10px);
    border: 1px solid var(--welcome-line);
    border-radius: 1rem;
    padding: 0.75rem;
    margin-top: 0.5rem;
}

.law-quiz-badge {
    display: inline-flex;
    margin-left: 0.4rem;
    background: #fff4d4;
    color: #9a6408;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
}

@media (max-width: 767.98px) {
    .law-btn-all-quiz {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .law-card {
        padding: 1rem;
        gap: 0.85rem;
    }

    .law-card-index {
        flex-basis: 2.5rem;
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 0.8rem;
        font-size: 0.92rem;
    }

    .law-card h2 {
        font-size: 1.05rem;
    }

    .law-btn-quiz,
    .law-btn-quiz-pack,
    .law-btn-download {
        width: 100%;
        justify-content: center;
    }

    .law-dialog-card {
        width: calc(100% - 0.5rem);
    }
}
