/* Nav links */
.glass-nav__link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.glass-nav__link:hover {
    color: var(--accent);
    background: rgba(99, 102, 241, 0.08);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
    position: relative;
    overflow: hidden;
}

.btn--primary {
    background: linear-gradient(135deg, var(--accent) 0%, #a855f7 100%);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn--primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    color: var(--white);
}

.btn--primary:active {
    transform: translateY(-1px);
}

.btn--outline {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--accent);
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn--outline:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.8);
    color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn--lg {
    padding: 1rem 2.25rem;
    font-size: 1.1rem;
    border-radius: var(--radius-md);
}

.btn--block {
    width: 100%;
}

.btn--ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
}

.btn--ghost:hover {
    color: var(--accent);
    background: var(--accent-bg);
}

/* Form inputs */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1.5px solid rgba(99, 102, 241, 0.12);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all var(--transition);
    outline: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), var(--shadow-sm);
    background: var(--white);
}

.form-select option {
    background: var(--white);
    color: var(--text-primary);
}

/* Radio & Checkbox cards */
.choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.choice-card {
    position: relative;
}

.choice-card input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.choice-card label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.6);
    border: 1.5px solid rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.95rem;
    font-weight: 500;
}

.choice-card label:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.choice-card input:checked + label {
    background: var(--accent-bg);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    color: var(--accent-dark);
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.badge--accent {
    background: var(--accent-bg);
    color: var(--accent);
}

.badge--success {
    background: var(--success-bg);
    color: var(--success);
}

.badge--warning {
    background: var(--warning-bg);
    color: #b45309;
}

.badge--federal {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.badge--regional {
    background: rgba(168, 85, 247, 0.1);
    color: #7c3aed;
}

.badge--municipal {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

/* Cards grid */
.cards-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Benefit card */
.benefit-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.benefit-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.benefit-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
}

.benefit-card__desc {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.benefit-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(99, 102, 241, 0.06);
}

.benefit-card__amount {
    font-size: 1.1rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--success), #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Score indicator */
.score {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent);
}

.score__bar {
    width: 48px;
    height: 5px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.score__fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent) 0%, #a855f7 100%);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Progress bar */
.progress {
    width: 100%;
    height: 5px;
    background: rgba(99, 102, 241, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.progress__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, #a855f7 100%);
    border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Steps (vertical stepper) */
.steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.step {
    display: flex;
    gap: 1.25rem;
    padding-bottom: 1.5rem;
    animation: fadeInUp 0.4s ease both;
}

.step:nth-child(1) { animation-delay: 0.1s; }
.step:nth-child(2) { animation-delay: 0.2s; }
.step:nth-child(3) { animation-delay: 0.3s; }
.step:nth-child(4) { animation-delay: 0.4s; }
.step:nth-child(5) { animation-delay: 0.5s; }

.step:last-child {
    padding-bottom: 0;
}

.step__marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.step__number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.8) 0%, rgba(168, 85, 247, 0.8) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--white);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.step__line {
    flex: 1;
    width: 2px;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.05) 100%);
    margin-top: 0.5rem;
}

.step:last-child .step__line {
    display: none;
}

.step__content {
    padding-top: 0.5rem;
    flex: 1;
}

.step__title {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
}

.step__desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.step__tip {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--warning-bg);
    border-left: 3px solid var(--warning);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.85rem;
    color: #92400e;
}

/* Document list */
.doc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.doc-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.92rem;
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(99, 102, 241, 0.06);
}

.doc-list li::before {
    content: "";
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    background: var(--accent);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Error messages */
.errorlist {
    list-style: none;
    padding: 0;
    margin: 0.35rem 0 0;
}

.errorlist li {
    color: var(--danger);
    font-size: 0.85rem;
    font-weight: 500;
}

/* City grid on landing */
.city-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 0.875rem;
}

.city-card {
    padding: 1.25rem 1rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

.city-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #a855f7);
    opacity: 0;
    transition: opacity var(--transition);
}

.city-card:hover::before {
    opacity: 1;
}

.city-card__name {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.city-card__region {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Hero section */
.hero {
    padding: 5rem 0 3rem;
    text-align: center;
    position: relative;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.5s ease both;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.hero h1 {
    animation: fadeInUp 0.6s ease 0.1s both;
    max-width: 700px;
    margin: 0 auto 1rem;
}

.hero__subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    animation: fadeInUp 0.6s ease 0.2s both;
    line-height: 1.65;
}

.hero__cta {
    animation: fadeInUp 0.6s ease 0.3s both;
}

.hero__cta .btn {
    animation: pulse 3s ease-in-out 2s infinite;
}

/* Feature cards */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
}

.feature-card {
    padding: 1.75rem;
    text-align: left;
    animation: fadeInUp 0.5s ease both;
}

.feature-card__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.feature-card__icon--purple {
    background: rgba(168, 85, 247, 0.12);
}

.feature-card__icon--blue {
    background: rgba(59, 130, 246, 0.12);
}

.feature-card__icon--green {
    background: rgba(16, 185, 129, 0.12);
}

.feature-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
}

.feature-card__desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* Benefits list footer section */
.benefits-preview {
    padding: 3rem 0;
    position: relative;
    z-index: 1;
}

.benefits-preview__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: 0.75rem;
}

.benefits-preview__item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
    padding: 0.85rem 1.1rem;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.06);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    text-decoration: none;
    color: var(--text-primary);
    min-height: 0;
}

.benefits-preview__item:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(99, 102, 241, 0.15);
    transform: translateX(4px);
    color: var(--text-primary);
}

.benefits-preview__amount {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--success);
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 1px;
}

.benefits-preview__name {
    font-size: 0.85rem;
    font-weight: 500;
    flex: 1;
    min-width: 130px;
    line-height: 1.35;
    overflow-wrap: break-word;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.pagination__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.7);
    border: 1.5px solid rgba(99, 102, 241, 0.12);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition);
}

.pagination__btn:hover {
    background: var(--accent-bg);
    border-color: var(--accent-light);
    color: var(--accent);
    transform: translateY(-2px);
}

.pagination__btn--active {
    background: linear-gradient(135deg, var(--accent) 0%, #a855f7 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.pagination__btn--active:hover {
    color: white;
    transform: none;
}

.pagination__dots {
    color: var(--text-muted);
    padding: 0 0.25rem;
}

/* Nav search */
.nav-search {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.6);
    border: 1.5px solid rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: all var(--transition);
}

.nav-search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: white;
}

.nav-search__input {
    border: none;
    background: transparent;
    padding: 0.45rem 0.75rem;
    font-family: var(--font-main);
    font-size: 0.875rem;
    color: var(--text-primary);
    outline: none;
    width: 180px;
}

.nav-search__input::placeholder {
    color: var(--text-muted);
}

.nav-search__btn {
    background: transparent;
    border: none;
    padding: 0.45rem 0.6rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color var(--transition);
}

.nav-search__btn:hover {
    color: var(--accent);
}

/* Mobile burger */
.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    padding: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.nav-burger:hover {
    background: var(--accent-bg);
}

.nav-burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.nav-burger--open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-burger--open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.nav-burger--open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 680px) {
    .nav-burger {
        display: flex;
    }

    .glass-nav__links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(99, 102, 241, 0.1);
        padding: 1rem 1.5rem;
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
        z-index: 99;
        box-shadow: 0 8px 32px rgba(99, 102, 241, 0.1);
    }

    .glass-nav__links.nav-links--open {
        display: flex;
    }

    .glass-nav .container {
        position: relative;
    }

    .nav-search {
        width: 100%;
    }

    .nav-search__input {
        width: 100%;
        flex: 1;
    }
}

/* Stats bar on landing */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
}

.stat-item {
    padding: 1.25rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.stat-item__num {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent) 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.stat-item__label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Footer */
.site-footer {
    position: relative;
    z-index: 1;
    padding: 3rem 0 2rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(99, 102, 241, 0.08);
}

.site-footer p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links__col h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.footer-links__col ul {
    list-style: none;
    padding: 0;
}

.footer-links__col li {
    margin-bottom: 0.4rem;
}

.footer-links__col a {
    font-size: 0.82rem;
    color: var(--text-secondary);
    transition: color var(--transition);
}

.footer-links__col a:hover {
    color: var(--accent);
}

/* Section headers */
.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* Button size modifier */
.btn--sm {
    padding: 0.45rem 1rem;
    font-size: 0.875rem;
}

.btn--accent {
    background: linear-gradient(135deg, var(--accent) 0%, #a855f7 100%);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}
.btn--accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
    color: var(--white);
}

/* Document accordion */
.doc-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.doc-card {
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.55);
    overflow: hidden;
}

.doc-card__header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.9rem;
    cursor: pointer;
    list-style: none;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-primary);
    user-select: none;
    flex-wrap: wrap;
}

.doc-card__header::-webkit-details-marker { display: none; }

.doc-card__header:hover {
    background: rgba(99, 102, 241, 0.04);
}

.doc-card__icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.doc-card__name {
    flex: 1;
}

.doc-card__type-badge {
    font-size: 0.72rem;
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
    background: var(--accent-bg);
    color: var(--accent-dark);
    font-weight: 500;
    white-space: nowrap;
}

.doc-card__arrow {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: transform 0.2s;
    flex-shrink: 0;
}

details[open] .doc-card__arrow {
    transform: rotate(180deg);
}

.doc-card__body {
    padding: 0.75rem 1rem 0.9rem 2.4rem;
    border-top: 1px solid rgba(99, 102, 241, 0.07);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.doc-card__desc {
    margin-bottom: 0.65rem;
    line-height: 1.5;
}

.doc-card__meta {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}

.doc-card__meta-item {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.doc-card__meta-label {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.doc-card__insts {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    padding: 0.6rem 0.75rem;
    background: rgba(99, 102, 241, 0.04);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(99, 102, 241, 0.08);
}

.doc-card__inst {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(99, 102, 241, 0.06);
}

.doc-card__inst:first-of-type {
    padding-top: 0.4rem;
    border-top: none;
}

.doc-card__inst-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
}

.doc-card__inst-addr {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.doc-card__inst-phone {
    font-size: 0.78rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.doc-card__inst-phone:hover {
    text-decoration: underline;
}

.doc-card__inst-site {
    font-size: 0.78rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.doc-card__inst-site:hover {
    text-decoration: underline;
}

.doc-card__gosuslugi {
    display: inline-block;
    font-size: 0.82rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}
.doc-card__gosuslugi:hover { text-decoration: underline; }

.doc-card--simple {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.9rem;
    font-size: 0.92rem;
    color: var(--text-secondary);
}

/* Application template */
.app-template {
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.6);
    overflow: hidden;
}

.app-template__header {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.9rem 1rem;
    background: var(--accent-bg);
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.app-template__title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--accent-dark);
}

.app-template__preamble {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.app-template__text {
    margin: 0;
    padding: 1rem;
    font-family: var(--font-main);
    font-size: 0.85rem;
    line-height: 1.65;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 320px;
    overflow-y: auto;
    background: transparent;
    border: none;
}

.app-template__form {
    display: none;
    padding: 1rem;
    font-family: var(--font-main);
    font-size: 0.85rem;
    line-height: 1.9;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 420px;
    overflow-y: auto;
    background: rgba(99, 102, 241, 0.02);
}

.tmpl-field {
    display: inline-block;
    border: none;
    border-bottom: 1.5px solid var(--accent);
    background: rgba(99, 102, 241, 0.06);
    border-radius: 2px 2px 0 0;
    padding: 0 5px 1px;
    font-family: var(--font-main);
    font-size: 0.85rem;
    color: var(--text-primary);
    outline: none;
    vertical-align: baseline;
    transition: background 0.15s, border-color 0.15s;
    min-width: 60px;
}

.tmpl-field:focus {
    background: rgba(99, 102, 241, 0.12);
    border-bottom-color: var(--accent-dark);
}

.tmpl-field::placeholder {
    color: var(--accent);
    opacity: 0.5;
    font-size: 0.78rem;
}

.app-template__actions {
    padding: 0.6rem 1rem;
    border-top: 1px solid rgba(99, 102, 241, 0.07);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* District filter chips */
.district-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.25rem;
}

.dist-btn {
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    font-family: var(--font-main);
    font-weight: 500;
    border: 1.5px solid rgba(99, 102, 241, 0.2);
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.dist-btn:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.4);
    color: var(--accent);
}

.dist-btn--active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.dist-btn--active:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
}

/* Highlighted institution card (user's district) */
.inst-card {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.06);
}

.inst-phone-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.inst-phone-link:hover {
    text-decoration: underline;
}

.inst-card--highlight {
    background: rgba(99, 102, 241, 0.05);
    border: 1.5px solid rgba(99, 102, 241, 0.25);
}

.doc-card__inst--highlight {
    background: rgba(99, 102, 241, 0.05);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    margin: 0 -0.6rem;
    border-left: 3px solid var(--accent);
}

.inst-district-hint {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: 0.4rem 0 0;
}

/* Show more / collapse for institution list in doc cards */
.doc-card__more {
    margin-top: 0.25rem;
}

.doc-card__more-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    list-style: none;
    padding: 0.3rem 0;
    user-select: none;
}

.doc-card__more-toggle::-webkit-details-marker { display: none; }

.doc-card__more-toggle::before {
    content: "▸";
    font-size: 0.75rem;
    transition: transform 0.15s ease;
}

details.doc-card__more[open] > .doc-card__more-toggle::before {
    transform: rotate(90deg);
}

.doc-card__more-toggle .more-show { display: inline; }
.doc-card__more-toggle .more-hide { display: none; }

details.doc-card__more[open] > .doc-card__more-toggle .more-show { display: none; }
details.doc-card__more[open] > .doc-card__more-toggle .more-hide { display: inline; }

/* ── Ad blocks ─────────────────────────────────────────── */
.ad-block {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.45);
    border: 1px dashed rgba(99, 102, 241, 0.18);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin: 2rem 0;
}

.ad-block--banner {
    width: 100%;
    min-height: 90px;
}

.ad-block--rectangle {
    max-width: 580px;
    min-height: 120px;
    margin-left: auto;
    margin-right: auto;
}

.ad-block__label {
    position: absolute;
    top: 5px;
    left: 8px;
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    pointer-events: none;
}

.ad-block__content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.ad-block__placeholder {
    font-size: 0.82rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.ad-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.35);
    border: 1px dashed rgba(99, 102, 241, 0.2);
    border-radius: var(--radius);
    min-height: 160px;
    padding: 1rem;
    gap: 0.5rem;
}

.ad-card__label {
    font-size: 0.62rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    position: absolute;
    top: 7px;
    left: 10px;
}

.ad-card__text {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

@media (max-width: 480px) {
    .ad-block--banner { min-height: 60px; }
    .ad-block--rectangle { min-height: 80px; }
}
