:root {
    --blue-950: #0b1f3a;
    --blue-900: #12345b;
    --blue-700: #1e63b6;
    --blue-600: #2674d9;
    --blue-100: #e8f2ff;
    --blue-50: #f4f8ff;
    --ink: #182335;
    --muted: #65758b;
    --line: #d9e4f2;
    --white: #ffffff;
    --success: #1d8f62;
    --warning: #b7791f;
    --danger: #b83232;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--blue-50);
    line-height: 1.55;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.nav {
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.brand strong {
    color: var(--blue-950);
    font-size: 21px;
}

.brand span {
    color: var(--muted);
    font-size: 13px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--blue-900);
    font-size: 15px;
}

.nav-links a:hover {
    color: var(--blue-600);
}

.page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 34px 24px 72px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 32px;
    align-items: stretch;
    padding: 34px 0 42px;
}

.hero-copy {
    padding: 24px 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--blue-700);
    background: var(--blue-100);
    border: 1px solid #cfe2ff;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 14px;
    font-weight: 700;
}

h1,
h2,
h3 {
    line-height: 1.1;
    color: var(--blue-950);
    margin: 0;
}

h1 {
    margin-top: 18px;
    font-size: clamp(36px, 5vw, 62px);
    max-width: 850px;
}

h2 {
    font-size: 34px;
    margin-bottom: 14px;
}

h3 {
    font-size: 21px;
}

.lead {
    color: var(--muted);
    font-size: 20px;
    max-width: 780px;
    margin: 18px 0 0;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.actions.compact {
    margin-top: 0;
}

.button {
    border: 1px solid transparent;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    font-weight: 800;
    cursor: pointer;
}

.button.primary {
    background: var(--blue-700);
    color: var(--white);
    box-shadow: 0 12px 26px rgba(30, 99, 182, 0.25);
}

.button.secondary {
    background: var(--white);
    color: var(--blue-900);
    border-color: var(--line);
}

.button.ghost {
    color: var(--blue-700);
    background: transparent;
    border-color: #bcd2ee;
}

.button.disabled {
    background: #eef3f8;
    color: var(--muted);
    border-color: var(--line);
    box-shadow: none;
    cursor: default;
}

.button:hover {
    transform: translateY(-1px);
}

.button.disabled:hover {
    transform: none;
}

.panel,
.card,
.form-panel {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(18, 52, 91, 0.08);
}

.hero-panel {
    padding: 24px;
    display: grid;
    gap: 16px;
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat {
    background: var(--blue-50);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}

.stat strong {
    display: block;
    color: var(--blue-950);
    font-size: 24px;
}

.stat span,
.muted {
    color: var(--muted);
}

.service-stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-stat-row .stat:last-child {
    grid-column: 1 / -1;
}

.service-stat-row .stat:last-child strong {
    font-size: 22px;
}

.section {
    padding: 30px 0;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.grid {
    display: grid;
    gap: 16px;
}

.grid.docs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.grid.options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

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

.legal-card {
    gap: 12px;
}

.legal-card h2 {
    font-size: 24px;
    margin: 20px 0 2px;
}

.legal-card p {
    color: var(--ink);
}

.legal-card .muted {
    color: var(--muted);
}

.tag {
    width: fit-content;
    color: var(--blue-700);
    background: var(--blue-100);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 700;
}

.price {
    color: var(--blue-950);
    font-size: 22px;
    font-weight: 900;
}

.card .price {
    margin-top: auto;
}

.doc-card {
    min-height: 360px;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-tabs .tag {
    border: 1px solid #cfe2ff;
    color: var(--blue-900);
}

.document-section {
    scroll-margin-top: 110px;
}

.option-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(18, 52, 91, 0.08);
    display: grid;
    gap: 14px;
    align-content: start;
    padding: 20px;
}

.option-card p {
    color: var(--muted);
    margin: 0;
}

.trust-strip {
    background: linear-gradient(135deg, var(--white), #f8fbf7);
    border: 1px solid var(--line);
    border-left: 5px solid var(--success);
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(18, 52, 91, 0.08);
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
    padding: 24px;
}

.trust-strip h2 {
    margin-top: 12px;
}

.trust-points {
    display: grid;
    gap: 12px;
}

.trust-points div {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid #d7eadf;
    border-radius: 8px;
    padding: 14px;
}

.trust-points strong {
    color: var(--blue-950);
    display: block;
    margin-bottom: 4px;
}

.trust-points span {
    color: var(--muted);
}

.practice-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.practice-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(18, 52, 91, 0.07);
    display: grid;
    gap: 10px;
    min-height: 180px;
    padding: 18px;
}

.practice-card:nth-child(3n + 1) {
    border-top: 4px solid var(--blue-700);
}

.practice-card:nth-child(3n + 2) {
    border-top: 4px solid var(--success);
}

.practice-card:nth-child(3n) {
    border-top: 4px solid var(--warning);
}

.practice-card p {
    color: var(--muted);
    margin: 0;
}

.accent-card {
    background: #fbfcff;
    border-color: #bfd6f2;
}

.text-link {
    color: var(--blue-700);
    font-weight: 800;
    padding: 10px 0;
}

.text-link:hover {
    color: var(--blue-600);
}

.list {
    margin: 0;
    padding-left: 19px;
    color: var(--muted);
}

.steps {
    counter-reset: step;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.step {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}

.step::before {
    counter-increment: step;
    content: counter(step);
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--blue-700);
    color: var(--white);
    font-weight: 800;
    margin-bottom: 12px;
}

.form-panel {
    padding: 24px;
}

form {
    display: grid;
    gap: 14px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--blue-950);
    font-weight: 750;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #c9d8ea;
    border-radius: 8px;
    min-height: 44px;
    padding: 11px 12px;
    color: var(--ink);
    background: var(--white);
    font: inherit;
}

textarea {
    min-height: 130px;
    resize: vertical;
}

.consent-row {
    align-items: flex-start;
    display: flex;
    gap: 10px;
    font-weight: 700;
}

.consent-row input {
    flex: 0 0 auto;
    margin-top: 5px;
    min-height: auto;
    width: auto;
}

.legal-note {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
    margin: 0;
}

.legal-note a {
    color: var(--blue-700);
    font-weight: 800;
}

.notice {
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    border-radius: 8px;
    padding: 14px 16px;
    color: var(--blue-900);
}

.danger-notice {
    background: #fff5f5;
    border-color: #fecaca;
    color: var(--danger);
}

.admin-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.summary-card,
.filter-panel,
.empty-state {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(18, 52, 91, 0.08);
}

.summary-card {
    display: grid;
    gap: 8px;
    padding: 18px;
}

.summary-card span {
    color: var(--muted);
    font-weight: 750;
}

.summary-card strong {
    color: var(--blue-950);
    font-size: 30px;
    line-height: 1;
}

.summary-card:hover {
    border-color: #bcd2ee;
    transform: translateY(-1px);
}

.summary-card.muted-card:hover {
    transform: none;
}

.filter-panel {
    padding: 18px;
}

.admin-filters {
    align-items: end;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(220px, 320px) auto;
    gap: 14px;
}

.filter-actions {
    display: flex;
    gap: 10px;
}

.table-wrap {
    overflow-x: auto;
}

.admin-table th,
.admin-table td {
    min-width: 120px;
}

.admin-table th:first-child,
.admin-table td:first-child {
    min-width: 140px;
}

.admin-table th:nth-child(3),
.admin-table td:nth-child(3) {
    min-width: 280px;
}

.block {
    display: block;
    margin-top: 4px;
}

.file-count {
    background: var(--blue-50);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--blue-900);
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    margin: 2px 4px 2px 0;
    padding: 4px 8px;
    white-space: nowrap;
}

.empty-state {
    padding: 24px;
}

.chat {
    display: grid;
    gap: 12px;
    margin: 18px 0;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 4px;
}

.message {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: var(--blue-50);
}

.message.admin {
    background: #eef7f2;
    border-color: #c8e7d5;
}

.message.client {
    background: #f7fbff;
}

.message-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--blue-950);
    margin-bottom: 8px;
}

.message-head span {
    color: var(--muted);
    font-size: 13px;
}

.message p {
    margin: 0;
    white-space: pre-wrap;
}

.status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    background: var(--blue-100);
    color: var(--blue-900);
    font-weight: 800;
    font-size: 13px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.table th,
.table td {
    border-bottom: 1px solid var(--line);
    padding: 13px 14px;
    text-align: left;
    vertical-align: top;
}

.table th {
    color: var(--blue-950);
    background: #eef5ff;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--white);
}

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
}

@media (max-width: 900px) {
    .hero,
    .grid.docs,
    .grid.options,
    .grid.two,
    .steps,
    .trust-strip {
        grid-template-columns: 1fr;
    }

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

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

    .nav-links {
        flex-wrap: wrap;
    }

    .admin-summary,
    .admin-filters {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        flex-direction: column;
    }

    .stat-row {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 560px) {
    .nav {
        gap: 10px;
        padding: 12px 16px;
    }

    .brand span {
        display: none;
    }

    .nav-links {
        gap: 10px;
        font-size: 14px;
    }

    .page {
        padding-left: 16px;
        padding-right: 16px;
    }

    h1 {
        font-size: 31px;
    }

    h2 {
        font-size: 28px;
    }

    .hero {
        padding-top: 18px;
    }

    .hero-copy {
        padding: 12px 0;
    }

    .lead {
        font-size: 18px;
        line-height: 1.45;
    }

    .actions,
    .footer-inner {
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

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

    .practice-card {
        min-height: auto;
    }
}
