:root {
    --brand-green: #0d7a5f;
    --brand-green-dark: #062f23;
    --brand-green-deep: #04281d;
    --brand-mint: #6ee7c7;
    --brand-soft: #eefbf7;
    --brand-bg: #f7f9fb;
    --brand-ink: #111827;
    --brand-muted: #6b7280;
    --brand-border: #e5e7eb;
    --brand-amber: #c9831b;
    --radius-lg: 22px;
    --radius-md: 16px;
    --shadow-soft: 0 18px 50px rgba(15, 23, 42, .08);
    --shadow-card: 0 4px 16px rgba(15, 23, 42, .05);
}

* {
    box-sizing: border-box;
}

body {
    background: #fff;
    color: var(--brand-ink);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.brand-text,
.btn,
.nav-link {
    font-family: Sora, Inter, system-ui, sans-serif;
    letter-spacing: 0;
}

a {
    color: var(--brand-green);
    text-decoration: none;
}

a:hover {
    color: var(--brand-green-dark);
}

.site-container {
    max-width: 1280px;
}

.site-header {
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid rgba(229, 231, 235, .8);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    min-height: 72px;
}

.brand-mark,
.footer-brand {
    align-items: center;
    color: var(--brand-green);
    display: inline-flex;
    gap: .65rem;
}

.brand-icon {
    align-items: center;
    background: var(--brand-green);
    border-radius: 14px;
    color: #fff;
    display: inline-flex;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-text strong {
    color: var(--brand-green-dark);
    font-size: 1rem;
    font-weight: 800;
}

.brand-text small {
    color: var(--brand-muted);
    font-size: .78rem;
    font-weight: 700;
}

.navbar-nav {
    gap: .2rem;
}

.nav-link {
    border-radius: 12px;
    color: #374151;
    font-size: .9rem;
    font-weight: 700;
    padding: .55rem .75rem !important;
}

.nav-link:hover,
.nav-link:focus,
.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--brand-soft);
    color: var(--brand-green);
}

.dropdown-menu {
    border: 1px solid var(--brand-border);
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
    padding: .55rem;
}

.dropdown-item {
    border-radius: 10px;
    font-size: .92rem;
    padding: .7rem .85rem;
}

.header-actions {
    align-items: center;
    display: flex;
    gap: .5rem;
}

.btn-icon {
    align-items: center;
    border-radius: 14px;
    color: #374151;
    display: inline-flex;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.btn-icon:hover {
    background: var(--brand-soft);
    color: var(--brand-green);
}

.btn-brand,
.btn-primary {
    --bs-btn-bg: var(--brand-green);
    --bs-btn-border-color: var(--brand-green);
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--brand-green-dark);
    --bs-btn-hover-border-color: var(--brand-green-dark);
    border-radius: 14px;
    font-weight: 800;
}

.btn-outline-brand,
.btn-outline-primary {
    border-color: var(--brand-green);
    border-radius: 14px;
    color: var(--brand-green);
    font-weight: 800;
}

.btn-outline-brand:hover,
.btn-outline-primary:hover {
    background: var(--brand-green);
    border-color: var(--brand-green);
    color: #fff;
}

.home-hero {
    background-image: linear-gradient(105deg, rgba(4, 40, 29, .98) 0%, rgba(4, 40, 29, .9) 52%, rgba(4, 40, 29, .64) 100%), url("../img/hero-legal.svg");
    background-position: center right;
    background-size: cover;
    color: #fff;
    min-height: 760px;
    overflow: hidden;
    position: relative;
}

.home-hero__content {
    max-width: 720px;
    padding: 3rem 0 8rem;
}

.badge-soft {
    align-items: center;
    background: var(--brand-soft);
    border: 1px solid #c8f7e6;
    border-radius: 999px;
    color: var(--brand-green);
    display: inline-flex;
    font-size: .78rem;
    font-weight: 700;
    gap: .45rem;
    padding: .42rem .75rem;
}

.eyebrow {
    align-items: center;
    background: var(--brand-soft);
    border: 1px solid #c8f7e6;
    border-radius: 999px;
    color: var(--brand-green);
    display: inline-flex;
    font-size: .78rem;
    font-weight: 900;
    gap: .45rem;
    margin-bottom: .8rem;
    padding: .42rem .75rem;
}

.badge-hero {
    background: rgba(13, 122, 95, .32);
    border-color: rgba(110, 231, 199, .32);
    color: var(--brand-mint);
}

.badge-hero span {
    background: var(--brand-mint);
    border-radius: 50%;
    height: 7px;
    width: 7px;
}

.home-hero h1 {
    font-size: clamp(2.7rem, 7vw, 4.2rem);
    font-weight: 700;
    line-height: 1.06;
    margin: 2rem 0 1.5rem;
}

.home-hero h1 strong {
    color: var(--brand-mint);
    display: inline-block;
    font-weight: inherit;
}

.home-hero p {
    color: #d7dee6;
    font-size: 1.15rem;
    line-height: 1.7;
    max-width: 610px;
}

.hero-search {
    align-items: center;
    background: #fff;
    border-radius: 18px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 116px;
    margin: 2rem 0 .8rem;
    max-width: 680px;
    overflow: hidden;
}

.hero-search i {
    color: #9ca3af;
    justify-self: center;
}

.hero-search input {
    border: 0;
    min-height: 60px;
    outline: 0;
    padding: 0 .5rem;
}

.hero-search button {
    align-self: stretch;
    background: var(--brand-green);
    border: 0;
    color: #fff;
    font-weight: 800;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.hero-tags a {
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    color: #d1fae5;
    font-size: .78rem;
    padding: .3rem .72rem;
}

.hero-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2.8rem;
}

.hero-metrics strong,
.metrics-row strong {
    color: #fff;
    display: block;
    font-size: 1.65rem;
    font-weight: 900;
}

.hero-metrics span {
    color: #a8b7c1;
    font-size: .85rem;
}

.quick-access {
    margin-top: -5.25rem;
    position: relative;
    z-index: 5;
}

.quick-card,
.content-card,
.page-content,
.dictionary-box,
.dictionary-side,
.study-card,
.testimonial-card {
    background: #fff;
    border: 1px solid rgba(229, 231, 235, .92);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.quick-card {
    color: inherit;
    display: block;
    min-height: 176px;
    padding: 1.7rem;
    transition: transform .2s ease, box-shadow .2s ease;
}

.quick-card:hover,
.study-card:hover,
.testimonial-card:hover {
    box-shadow: var(--shadow-soft);
    color: inherit;
    transform: translateY(-3px);
}

.icon-box {
    align-items: center;
    background: rgba(13, 122, 95, .09);
    border-radius: 15px;
    color: var(--brand-green);
    display: inline-flex;
    height: 46px;
    justify-content: center;
    width: 46px;
}

.quick-card h2,
.study-card h3,
.oab-card h3 {
    font-size: 1.08rem;
    font-weight: 900;
    margin: 1rem 0 .45rem;
}

.quick-card p,
.study-card p,
.testimonial-card p,
.section-lead {
    color: var(--brand-muted);
    line-height: 1.72;
}

.section-pad {
    padding: 6.5rem 0;
}

.section-muted {
    background: var(--brand-bg);
}

.section-title,
.section-heading h2,
.page-title h1 {
    color: var(--brand-ink);
    font-size: clamp(2rem, 4vw, 3.1rem);
    font-weight: 700;
    line-height: 1.15;
}

.section-title strong {
    color: var(--brand-green);
    font-weight: inherit;
}

.section-heading {
    margin-bottom: 3rem;
    max-width: 720px;
}

.section-heading p {
    color: var(--brand-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.feature-list {
    display: grid;
    gap: .85rem;
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
}

.feature-list li {
    align-items: center;
    color: #374151;
    display: flex;
    gap: .7rem;
}

.feature-list i {
    color: var(--brand-green);
}

.visual-panel {
    position: relative;
}

.visual-panel > img {
    border-radius: 26px;
    box-shadow: 0 26px 70px rgba(15, 23, 42, .16);
    display: block;
    width: 100%;
}

.floating-areas {
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: 20px;
    bottom: -2rem;
    box-shadow: var(--shadow-soft);
    left: -1.4rem;
    max-width: 350px;
    padding: 1.3rem;
    position: absolute;
}

.floating-areas strong {
    color: var(--brand-muted);
    display: block;
    font-size: .82rem;
    letter-spacing: .05em;
    margin-bottom: .7rem;
    text-transform: uppercase;
}

.floating-areas span,
.study-badge {
    background: var(--brand-soft);
    border-radius: 999px;
    color: var(--brand-green);
    display: inline-flex;
    font-size: .76rem;
    font-weight: 800;
    margin: .15rem;
    padding: .3rem .62rem;
}

.oab-section {
    background-image: linear-gradient(135deg, rgba(4, 40, 29, .97), rgba(13, 122, 95, .9)), url("../img/hero-legal.svg");
    background-position: center;
    background-size: cover;
    color: #fff;
}

.oab-section .section-heading h2,
.oab-section .section-heading p {
    color: #fff;
}

.oab-card {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--radius-lg);
    color: #fff;
    height: 100%;
    padding: 2rem;
}

.oab-card.is-active {
    background: var(--brand-green);
}

.oab-card p {
    color: rgba(255, 255, 255, .78);
    min-height: 84px;
}

.free-badge {
    background: rgba(255, 255, 255, .18);
    border-radius: 999px;
    color: #d1fae5;
    font-size: .75rem;
    font-weight: 900;
    padding: .28rem .65rem;
}

.study-card {
    height: 100%;
    overflow: hidden;
}

.study-card > img {
    height: 190px;
    object-fit: cover;
    width: 100%;
}

.study-card__body {
    padding: 1.6rem;
}

.study-card--purple .icon-box,
.study-card--purple .study-badge {
    background: #ede9fe;
    color: #7c3aed;
}

.study-card--amber .icon-box,
.study-card--amber .study-badge {
    background: #fff7ed;
    color: #b45309;
}

.study-card--blue .icon-box,
.study-card--blue .study-badge {
    background: #e0f2fe;
    color: #0369a1;
}

.metrics-row {
    margin-bottom: 4rem;
}

.metrics-row strong {
    color: var(--brand-green);
    font-size: clamp(2.3rem, 5vw, 3.6rem);
}

.metrics-row span {
    color: var(--brand-muted);
}

.section-divider {
    background: linear-gradient(90deg, transparent, var(--brand-border), transparent);
    height: 1px;
    margin: 1rem 0 4rem;
}

.testimonial-card {
    height: 100%;
    padding: 1.8rem;
}

.testimonial-card > i {
    color: rgba(13, 122, 95, .25);
    font-size: 2.2rem;
}

.avatar-initials {
    align-items: center;
    background: var(--brand-green);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-weight: 900;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.testimonial-card small {
    color: var(--brand-muted);
    display: block;
}

.stars {
    color: var(--brand-amber);
    font-size: .8rem;
    white-space: nowrap;
}

.newsletter-band {
    background: #ecfdf7;
    padding: 6rem 0;
}

.newsletter-card {
    background: linear-gradient(135deg, var(--brand-green), #0f8f70);
    border-radius: 28px;
    color: #fff;
    overflow: hidden;
    padding: 4rem 2rem;
    position: relative;
    text-align: center;
}

.newsletter-card::after {
    background: rgba(255, 255, 255, .12);
    border-radius: 50%;
    content: "";
    height: 220px;
    position: absolute;
    right: -50px;
    top: -60px;
    width: 220px;
}

.newsletter-card h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    margin: 1.4rem 0 1rem;
}

.newsletter-card p {
    color: rgba(255, 255, 255, .82);
    margin-left: auto;
    margin-right: auto;
    max-width: 680px;
}

.newsletter-form {
    display: flex;
    gap: .8rem;
    justify-content: center;
    margin: 2rem auto .8rem;
    max-width: 560px;
}

.newsletter-form input {
    border: 0;
    border-radius: 16px;
    flex: 1;
    min-height: 54px;
    padding: 0 1.1rem;
}

.newsletter-form button {
    background: var(--brand-green-dark);
    border: 0;
    border-radius: 16px;
    color: #fff;
    font-weight: 900;
    padding: 0 1.3rem;
}

.newsletter-card small {
    color: rgba(255, 255, 255, .72);
}

.page-title {
    background: linear-gradient(135deg, #eefbf7 0%, #fff 72%);
    border-bottom: 1px solid var(--brand-border);
    padding: 5rem 0 4rem;
}

.page-title h1 {
    margin: 1rem 0 .7rem;
}

.page-title p {
    color: var(--brand-muted);
    font-size: 1.08rem;
    line-height: 1.7;
    max-width: 760px;
}

.page-content {
    line-height: 1.85;
    padding: clamp(1.4rem, 3vw, 2.6rem);
}

.page-content img {
    height: auto;
    max-width: 100%;
}

.dictionary-layout {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1fr) 330px;
}

.dictionary-box,
.dictionary-side {
    padding: 1.45rem;
}

.dictionary-box h2,
.dictionary-side h2,
.dictionary-item h3 {
    color: var(--brand-green-dark);
    font-weight: 900;
}

.dictionary-content {
    line-height: 1.78;
}

.dictionary-item {
    border-bottom: 1px solid var(--brand-border);
    padding: 1rem 0;
}

.dictionary-item:first-child {
    padding-top: 0;
}

.dictionary-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.dictionary-item h3 {
    font-size: 1.1rem;
}

.dictionary-related {
    background: var(--brand-soft);
    border-radius: var(--radius-md);
    margin-top: 1.5rem;
    padding: 1rem;
}

.badge-link {
    background: #fff;
    border: 1px solid #ccefe4;
    border-radius: 999px;
    display: inline-block;
    font-weight: 800;
    padding: .35rem .7rem;
}

.dictionary-search {
    position: relative;
}

.dictionary-search .form-control {
    border-radius: 14px;
    min-height: 54px;
}

.dictionary-autocomplete {
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
    display: none;
    left: 0;
    max-height: 320px;
    overflow: auto;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 20;
}

.dictionary-autocomplete-item {
    background: #fff;
    border: 0;
    border-bottom: 1px solid #eef2f7;
    color: var(--brand-ink);
    display: block;
    padding: .75rem .9rem;
    text-align: left;
    width: 100%;
}

.dictionary-autocomplete-item:hover,
.dictionary-autocomplete-item:focus,
.dictionary-autocomplete-item.active {
    background: var(--brand-soft);
}

.dictionary-letters {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.dictionary-letters a {
    align-items: center;
    background: var(--brand-soft);
    border-radius: 8px;
    color: var(--brand-green);
    display: inline-flex;
    font-weight: 900;
    height: 34px;
    justify-content: center;
    min-width: 34px;
    padding: 0 .55rem;
}

.dictionary-letters a.active,
.dictionary-letters a:hover {
    background: var(--brand-green);
    color: #fff;
}

/*.pagination .page-link {
    color: var(--brand-green);
}*/

.pagination .active .page-link {
    background: var(--brand-green);
    border-color: var(--brand-green);
}

.site-footer {
    background: var(--brand-green-deep);
    color: rgba(255, 255, 255, .72);
}

.footer-main {
    padding: 5rem 0;
}

.site-footer .brand-icon {
    background: rgba(255, 255, 255, .12);
}

.site-footer .brand-text strong {
    color: #fff;
}

.site-footer .brand-text small,
.footer-copy {
    color: rgba(255, 255, 255, .66);
}

.footer-copy {
    line-height: 1.75;
    margin: 1.5rem 0;
    max-width: 370px;
}

.social-row {
    display: flex;
    gap: .75rem;
}

.social-row a {
    align-items: center;
    background: rgba(255, 255, 255, .09);
    border-radius: 12px;
    color: #fff;
    display: inline-flex;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.site-footer h2 {
    color: var(--brand-mint);
    font-size: .86rem;
    font-weight: 900;
    letter-spacing: .08em;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
}

.site-footer ul {
    display: grid;
    gap: .7rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer a {
    color: rgba(255, 255, 255, .68);
}

.site-footer a:hover {
    color: var(--brand-mint);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .55);
    font-size: .9rem;
    padding: 1.4rem 0;
}

@media (max-width: 1199.98px) {
    .navbar-collapse {
        padding: 1rem 0;
    }

    .header-actions {
        justify-content: flex-start;
        margin-top: .6rem;
    }
}

@media (max-width: 991.98px) {
    .home-hero {
        min-height: auto;
    }

    .home-hero__content {
        padding: 4.5rem 0 7rem;
    }

    .dictionary-layout {
        grid-template-columns: 1fr;
    }

    .floating-areas {
        bottom: auto;
        left: auto;
        margin-top: 1rem;
        max-width: none;
        position: static;
    }
}

@media (max-width: 575.98px) {
    .hero-search,
    .newsletter-form {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero-search i {
        display: none;
    }

    .hero-search input {
        padding: 0 1rem;
    }

    .hero-search button,
    .newsletter-form button {
        min-height: 52px;
    }

    .section-pad,
    .newsletter-band {
        padding: 4rem 0;
    }

    .quick-access {
        margin-top: -3.5rem;
    }
}

.template-sidebar,
.template-card,
.template-content-block {
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-md);
}

.template-sidebar {
    padding: 1rem;
}

.template-cat-list li + li {
    margin-top: .3rem;
}

.template-cat-list a {
    border-radius: 10px;
    color: #334155;
    display: flex;
    justify-content: space-between;
    padding: .5rem .65rem;
}

.template-cat-list a.active,
.template-cat-list a:hover {
    background: var(--brand-soft);
    color: var(--brand-green);
}

.template-card {
    padding: 1rem;
}

.template-card h3 {
    font-size: 1.05rem;
    font-weight: 800;
}

.template-meta {
    color: var(--brand-green);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .03em;
    margin-bottom: .35rem;
    text-transform: uppercase;
}

.template-content-block {
    margin-bottom: .9rem;
    padding: 1rem;
}

/* Mapas mentais */
.mind-map-card {
    display: flex;
    flex-direction: column;
    min-height: 230px;
}

.mind-map-pdf-wrap {
    background: #1f2937;
    border-radius: var(--radius-md);
    overflow: hidden;
    min-height: 70vh;
}

.mind-map-pdf-wrap iframe {
    background: #fff;
    border: 0;
    display: block;
    min-height: 70vh;
    width: 100%;
}

/* Admin */
.admin-body {
    background: #f5faf8;
}

.admin-main {
    min-height: calc(100vh - 72px);
}

.admin-login-main {
    align-items: center;
    background: radial-gradient(circle at 20% 20%, rgba(110, 231, 199, .25), transparent 28%), linear-gradient(135deg, #effdf8, #ffffff 45%, #e9fbf6);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.admin-login-card,
.admin-card,
.admin-stat-card {
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.admin-login-card {
    max-width: 430px;
    padding: 2rem;
    width: 100%;
}

.admin-card {
    padding: 1.25rem;
}

.admin-page-title {
    margin-bottom: 1.25rem;
}

.admin-page-title h1 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 900;
    margin: .35rem 0 .25rem;
}

.admin-stat-card {
    color: var(--brand-ink);
    display: grid;
    gap: .4rem;
    min-height: 150px;
    padding: 1.3rem;
    transition: transform .2s ease, box-shadow .2s ease;
}

.admin-stat-card:hover {
    box-shadow: var(--shadow-soft);
    color: var(--brand-ink);
    transform: translateY(-2px);
}

.admin-stat-card i {
    align-items: center;
    background: var(--brand-soft);
    border-radius: 14px;
    color: var(--brand-green);
    display: inline-flex;
    font-size: 1.3rem;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.admin-stat-card strong {
    font-size: 1.1rem;
    font-weight: 900;
}

.admin-stat-card span {
    color: var(--brand-muted);
}

.fw-black {
    font-weight: 900;
}

/* Student area + OAB simulations */
.student-auth-section {
    background: linear-gradient(180deg, #f0fbf7 0%, #ffffff 100%);
    min-height: 70vh;
}
.auth-card,
.content-card,
.question-card,
.result-card {
    background: #fff;
    border: 1px solid #dfe8e4;
    border-radius: 22px;
    box-shadow: 0 18px 45px rgba(12, 67, 53, .06);
    padding: 28px;
}
.vmb-form .form-control {
    border-radius: 14px;
    border-color: #d2ddd8;
    min-height: 46px;
}
.vmb-form .form-control:focus {
    border-color: #0b8065;
    box-shadow: 0 0 0 .2rem rgba(11, 128, 101, .12);
}
.student-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}
.student-action-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-decoration: none;
    color: #172033;
    background: #fff;
    border: 1px solid #dfe8e4;
    border-radius: 20px;
    padding: 22px;
    transition: .2s ease;
}
.student-action-card:hover {
    transform: translateY(-2px);
    color: #0b8065;
    box-shadow: 0 18px 40px rgba(12, 67, 53, .08);
}
.student-action-card i {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    color: #0b8065;
    background: #e7f8f2;
    font-size: 1.3rem;
}
.student-action-card span {
    color: #607083;
    font-size: .92rem;
}
.student-action-card.muted {
    opacity: .82;
}
.student-history-list {
    display: grid;
    gap: 12px;
}
.student-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #edf2f0;
    background: #fbfefd;
    border-radius: 16px;
    padding: 12px 14px;
}
.student-history-item small {
    display: block;
    color: #607083;
}
.student-history-item span {
    color: #0b8065;
    font-weight: 800;
}
.oab-sim-section {
    background: #f7faf9;
}
.result-card {
    background: linear-gradient(135deg, #0b8065 0%, #063f32 100%);
    color: #fff;
}
.result-card .section-badge {
    background: rgba(255,255,255,.12);
    color: #c9fff0;
    border-color: rgba(255,255,255,.25);
}
.result-card p {
    color: rgba(255,255,255,.86);
}
.question-card {
    padding: 24px;
}
.question-number {
    color: #0b8065;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: .78rem;
    margin-bottom: 10px;
}
.question-text {
    color: #172033;
    font-size: 1.02rem;
    line-height: 1.65;
}
.alternatives-list {
    display: grid;
    gap: 10px;
}
.alternative-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border: 1px solid #e1ebe7;
    background: #fbfefd;
    border-radius: 16px;
    padding: 14px;
    cursor: pointer;
}
.alternative-item:hover {
    border-color: #0b8065;
    background: #f1fbf7;
}
.alternative-letter {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e7f8f2;
    color: #0b8065;
    display: inline-grid;
    place-items: center;
    font-weight: 800;
    flex: 0 0 auto;
}
.check-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 12px;
}
.check-list li::before {
    content: '✓';
    color: #0b8065;
    font-weight: 900;
    margin-right: 8px;
}
@media (max-width: 991px) {
    .student-actions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 575px) {
    .student-actions-grid {
        grid-template-columns: 1fr;
    }
    .auth-card,
    .content-card,
    .question-card,
    .result-card {
        padding: 20px;
    }
}

/* Leis / Vade Mecum */
.laws-hero {
    background: linear-gradient(135deg, #073b2f 0%, #0b8065 100%);
    color: #fff;
}
.laws-hero p {
    color: rgba(255,255,255,.84);
    max-width: 760px;
}
.laws-section {
    background: #f7faf9;
}
.law-card {
    display: flex;
    flex-direction: column;
}
.law-card h3 {
    font-size: 1.16rem;
    line-height: 1.35;
    color: #152336;
}
.law-apelido {
    color: #0b8065;
    font-weight: 800;
    margin-bottom: .5rem;
}
.law-sidebar {
    top: 92px;
}
.law-sidebar h2,
.law-text-card h2 {
    font-size: 1.35rem;
}
.law-meta-list {
    display: grid;
    gap: 10px;
    margin: 0;
}
.law-meta-list dt {
    color: #607083;
    font-size: .82rem;
    margin: 0;
}
.law-meta-list dd {
    margin: -8px 0 0;
    color: #172033;
    font-weight: 800;
}
.law-official-text {
    color: #172033;
    line-height: 1.76;
    font-size: 1rem;
}
.law-official-text p,
.law-official-text div {
    margin-bottom: .85rem;
}
.law-official-text h1,
.law-official-text h2,
.law-official-text h3,
.law-official-text h4 {
    color: #0f3d2e;
    margin-top: 1.5rem;
    margin-bottom: .85rem;
    font-weight: 900;
}
.law-official-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}
.law-official-text td,
.law-official-text th {
    border: 1px solid #dce8e3;
    padding: 8px;
    vertical-align: top;
}
.law-related-item {
    border-left: 4px solid #0b8065;
    background: #f8fbfa;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 12px;
}
.admin-law-preview {
    max-height: 520px;
    overflow: auto;
    border: 1px solid #e1ebe7;
    border-radius: 16px;
    padding: 18px;
    background: #fff;
}
@media (max-width: 991px) {
    .law-sidebar {
        position: static !important;
    }
}

/* Texto de leis grandes por dispositivos */
.law-article-index {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    max-height: 280px;
    overflow: auto;
    padding-right: 4px;
}
.law-article-index a {
    border: 1px solid #dce8e3;
    border-radius: 999px;
    padding: 5px 8px;
    color: #0b8065;
    text-decoration: none;
    font-size: .82rem;
    font-weight: 800;
    text-align: center;
    background: #fff;
}
.law-article-index a:hover {
    background: #eaf7f3;
}
.law-device-search {
    border: 1px solid #e1ebe7;
    background: #f8fbfa;
    border-radius: 16px;
    padding: 14px;
}
.law-device-item {
    border: 1px solid #e1ebe7;
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 16px;
    background: #fff;
}
.law-device-label {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #eaf7f3;
    color: #0b8065;
    font-weight: 900;
    font-size: .78rem;
    padding: 5px 10px;
    margin-bottom: 10px;
}
@media (max-width: 575px) {
    .law-article-index {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Ajustes Vade Mecum - busca e leis grandes */
.laws-hero .hero-search {
    grid-template-columns: 52px minmax(0, 1fr) 132px;
    width: min(100%, 680px);
}
.laws-hero .hero-search input {
    width: 100%;
}
.laws-hero .hero-search button {
    min-width: 132px;
}
.law-sidebar {
    max-height: calc(100vh - 110px);
    overflow: auto;
}
.law-sidebar h3 {
    font-size: 1.1rem;
}
.law-ementa summary {
    color: #172033;
    cursor: pointer;
    font-family: Sora, Inter, system-ui, sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
}
.law-article-index {
    max-height: 46vh;
}
@media (max-width: 991px) {
    .law-sidebar {
        max-height: none;
        overflow: visible;
    }
}
@media (max-width: 575.98px) {
    .laws-hero .hero-search {
        grid-template-columns: 1fr;
    }
    .laws-hero .hero-search button {
        width: 100%;
    }
}


/* Ajuste: sem rolagem interna na coluna de dados/indice da lei */
.law-sidebar {
    position: static !important;
    top: auto;
    max-height: none !important;
    overflow: visible !important;
}
.law-article-index {
    max-height: none !important;
    overflow: visible !important;
    padding-right: 0;
}

/* Ajuste: página /leis no mesmo padrão das páginas institucionais */
.laws-section {
    background: var(--brand-bg);
}
.laws-search-card {
    border: 1px solid var(--brand-border);
    margin-top: -1.8rem;
    position: relative;
    z-index: 2;
}
.laws-search-card .section-title {
    font-size: clamp(1.7rem, 3vw, 2.45rem);
}
.laws-search-form {
    align-items: center;
    background: #fff;
    border: 1px solid #dce8e3;
    border-radius: 18px;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 140px;
    overflow: hidden;
    width: min(100%, 760px);
}
.laws-search-form i {
    color: #607083;
    font-size: 1.1rem;
    justify-self: center;
}
.laws-search-form input {
    border: 0;
    min-height: 58px;
    outline: none;
    padding: 0 1rem 0 0;
    width: 100%;
}
.laws-search-form button {
    align-self: stretch;
    background: var(--brand-green);
    border: 0;
    color: #fff;
    font-weight: 900;
    padding: 0 1.2rem;
}
.laws-search-form button:hover {
    background: var(--brand-green-dark);
}
@media (max-width: 575.98px) {
    .laws-search-card {
        margin-top: -1rem;
    }
    .laws-search-form {
        grid-template-columns: 46px minmax(0, 1fr);
    }
    .laws-search-form button {
        grid-column: 1 / -1;
        min-height: 52px;
    }
}

/* Ajuste: detalhe da lei no mesmo padrão das páginas institucionais */
.law-page-title {
    background: linear-gradient(135deg, #eefbf7 0%, #fff 72%);
    border-bottom: 1px solid var(--brand-border);
    color: var(--brand-ink);
}
.law-page-title h1 {
    max-width: 980px;
}
.law-page-title p {
    max-width: 760px;
}
.law-title-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.35rem;
}
.law-title-actions .btn {
    border-radius: 999px;
    font-weight: 800;
    padding: .72rem 1.1rem;
}
.law-detail-section {
    background: var(--brand-bg);
}
.law-detail-section .content-card {
    border: 1px solid var(--brand-border);
}
.law-text-card {
    position: relative;
}
.law-device-search .btn {
    min-height: 38px;
}
@media (max-width: 575.98px) {
    .law-title-actions .btn {
        justify-content: center;
        width: 100%;
    }
}

/* Ajuste Vade Mecum: divisores estruturais da lei sem etiqueta/pílula */
.law-device-item.law-device-heading {
    text-align: center;
    background: #fbfefd;
    padding-top: 20px;
    padding-bottom: 20px;
}
.law-device-item.law-device-heading .law-official-text h1,
.law-device-item.law-device-heading .law-official-text h2,
.law-device-item.law-device-heading .law-official-text h3,
.law-device-item.law-device-heading .law-official-text h4,
.law-device-item.law-device-heading .law-official-text p {
    margin: 0;
    color: #0f3d2e;
    font-family: Sora, Inter, system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.55;
    text-transform: uppercase;
    letter-spacing: .01em;
}

/* Ajuste Vade Mecum: busca por palavra-chave em dispositivos da lei */
.law-search-highlight {
    background: #fff3b0;
    border-radius: 4px;
    color: inherit;
    padding: 0 .12em;
}
.law-search-highlight strong {
    font-weight: 900;
}
.law-device-search .form-text {
    color: #607083;
    font-size: .82rem;
}

/* Leis - card inteiro clicável */
.law-card-link {
    color: inherit;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.law-card-link:hover {
    border-color: rgba(11, 128, 101, .45);
    box-shadow: 0 16px 34px rgba(15, 23, 42, .08);
    color: inherit;
    transform: translateY(-2px);
}
.law-card-link:hover h3,
.law-card-link:focus h3 {
    color: var(--brand-green);
}
.law-card-button {
    pointer-events: none;
}
