:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-strong: #eef2ff;
    --text: #172033;
    --text-muted: #64748b;
    --border: #dbe3ef;
    --border-strong: #cbd5e1;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #dbeafe;
    --success: #15803d;
    --success-soft: #dcfce7;
    --warning: #b45309;
    --warning-soft: #fef3c7;
    --danger: #dc2626;
    --danger-soft: #fee2e2;
    --info: #0369a1;
    --info-soft: #e0f2fe;
    --shadow-sm: 0 8px 22px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    min-height: 100%;
    margin: 0;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 32rem),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 42%, #eef4ff 100%);
    line-height: 1.55;
}

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

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

h1,
h2,
h3,
h4 {
    margin: 0 0 12px;
    color: var(--text);
    line-height: 1.18;
}

h1 {
    font-size: clamp(30px, 4vw, 46px);
    letter-spacing: -0.04em;
}

h2 {
    font-size: clamp(24px, 3vw, 32px);
    letter-spacing: -0.03em;
}

h3 {
    font-size: 20px;
}

p {
    margin: 0 0 14px;
}

code,
pre {
    font-family: "JetBrains Mono", Consolas, monospace;
}

pre {
    overflow-x: auto;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #0f172a;
    color: #e2e8f0;
}

ul {
    margin-top: 8px;
    padding-left: 22px;
}

li + li {
    margin-top: 6px;
}

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 18px 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(219, 227, 239, 0.9);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: min(var(--container), calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 800;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: #ffffff;
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.28);
    flex: 0 0 auto;
}

.brand-logo img {
    width: 20px;
    height: 20px;
    display: block;
    flex: 0 0 auto;
}

.brand:hover {
    color: var(--text);
    text-decoration: none;
}

.header-check-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 14px;
    border: 1px solid rgba(37, 99, 235, 0.28);
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.header-check-link:hover {
    background: #bfdbfe;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
}

.nav-links a:hover {
    color: var(--primary-dark);
    background: var(--primary-soft);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    margin: 0;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    box-shadow: none;
}

.nav-toggle[aria-expanded="true"] {
    color: var(--primary-dark);
    background: var(--primary-soft);
    border-color: rgba(37, 99, 235, 0.32);
}

.page-shell {
    width: min(var(--container), calc(100% - 32px));
    margin: 34px auto 46px;
}

.card {
    margin-bottom: 22px;
    padding: clamp(20px, 3vw, 30px);
    border: 1px solid rgba(219, 227, 239, 0.92);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-sm);
}

.card.compact {
    padding: 18px;
    border-radius: var(--radius-md);
}

.card .card {
    box-shadow: none;
}

.card:not(.vacancy-relevance-card).compact + .card:not(.vacancy-relevance-card).compact {
    margin-top: 12px;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(28px, 5vw, 52px);
    border: 1px solid rgba(191, 219, 254, 0.9);
    border-radius: 32px;
    background:
        radial-gradient(circle at top right, rgba(124, 58, 237, 0.18), transparent 22rem),
        linear-gradient(135deg, #ffffff 0%, #eef6ff 100%);
    box-shadow: var(--shadow-md);
}

.hero::after {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -80px;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero p {
    max-width: 760px;
    color: var(--text-muted);
    font-size: 17px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
}

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

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

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

.section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-header p {
    color: var(--text-muted);
}

.section-spaced {
    margin-top: 28px;
}

.page-shell > .card + .card,
.page-shell > .hero + .card,
.page-shell > .hero + .grid,
.page-shell > .grid + .card,
.page-shell > .card + .grid,
.page-shell > section + section {
    margin-top: 24px;
}

.card > .grid,
.card > .profile-details,
.card > .rag-status-details,
.card > .storage-metrics-grid {
    margin-top: 18px;
}

.metric-card + .info,
.metric-card + .warning,
.grid + .info,
.grid + .warning {
    margin-top: 18px;
}

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

.small {
    font-size: 13px;
}

label {
    display: block;
    margin: 16px 0 7px;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
}

input,
textarea,
select {
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

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

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.13);
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    margin-top: 18px;
    padding: 11px 18px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.26);
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

button:hover,
.button:hover {
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.32);
}

button:active,
.button:active {
    transform: translateY(0);
}

.button.secondary,
button.secondary {
    background: #475569;
    box-shadow: 0 10px 22px rgba(71, 85, 105, 0.22);
}

.button.danger,
button.danger {
    background: var(--danger);
    box-shadow: 0 10px 22px rgba(220, 38, 38, 0.22);
}

.button.ghost,
button.ghost {
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    box-shadow: none;
}

.button.ghost:hover,
button.ghost:hover {
    color: var(--primary-dark);
    background: var(--primary-soft);
}

button.is-loading,
.button.is-loading {
    opacity: 0.78;
    cursor: wait;
    transform: none;
}

button.is-loading:hover,
.button.is-loading:hover {
    transform: none;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.form-actions button,
.form-actions .button {
    margin-top: 0;
}

.full-width {
    width: 100%;
}

.error,
.success,
.warning,
.info {
    padding: 13px 15px;
    border-radius: var(--radius-md);
    margin: 0 0 16px;
    border: 1px solid transparent;
    font-weight: 650;
}

.error {
    color: #991b1b;
    background: var(--danger-soft);
    border-color: #fecaca;
}

.success {
    color: #166534;
    background: var(--success-soft);
    border-color: #bbf7d0;
}

.warning {
    color: #92400e;
    background: var(--warning-soft);
    border-color: #fde68a;
    margin-top: 10px;
}

.info {
    color: var(--info);
    background: var(--info-soft);
    border-color: #bae6fd;
}

.badge,
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.badge.success,
.status-pill.success,
.status-ready {
    color: var(--success);
    background: var(--success-soft);
}

.badge.warning,
.status-pill.warning,
.status-stale,
.status-building {
    color: var(--warning);
    background: var(--warning-soft);
}

.badge.danger,
.status-pill.danger,
.status-failed,
.status-missing {
    color: var(--danger);
    background: var(--danger-soft);
}

.status-pill {
    text-align: center;
}

.status-active {
    color: var(--success);
    background: var(--success-soft);
}

.status-inactive {
    color: var(--text-muted);
    background: #f1f5f9;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.table-wrap.is-switching {
    opacity: 0.55;
    transform: translateY(4px);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

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

th {
    background: var(--surface-soft);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

tr:last-child td {
    border-bottom: 0;
}

tr:hover td {
    background: #fbfdff;
}

.table-wrap .form-actions {
    gap: 8px;
    margin-top: 0;
}

.table-wrap .form-actions form,
.table-wrap .form-actions button,
.table-wrap .form-actions .button {
    margin-top: 0;
}

.table-wrap button,
.table-wrap .button {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 13px;
}

.table-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 16px;
    border-top: 1px solid var(--border);
    background: var(--surface-soft);
}

.table-pagination button {
    margin-top: 0;
}

.table-pagination button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.metric-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.metric-card strong,
.metric-value {
    display: block;
    font-size: 28px;
    line-height: 1;
    letter-spacing: -0.04em;
    word-break: break-word;
}

.metric-card span,
.metric-label {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
}

.filename-cell {
    max-width: 320px;
    word-break: break-word;
}

.report-document-title {
    display: block;
    margin-bottom: 4px;
}

.report-summary {
    margin-top: 20px;
}

.report-summary-grid {
    margin-bottom: 18px;
}

.report-file-card {
    width: 100%;
    max-width: none;
}

.issue-critical,
.issue-major,
.issue-minor,
.issue-card {
    border-left: 6px solid var(--primary);
}

.issue-critical {
    border-left-color: var(--danger);
}

.issue-major {
    border-left-color: #f59e0b;
}

.issue-minor {
    border-left-color: var(--primary);
}

.issues-list {
    display: grid;
    gap: 18px;
}

.issue-card-wide {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 24px;
    align-items: start;
}

.issue-card-wide h3 {
    margin-bottom: 12px;
}

.issue-side {
    padding-left: 18px;
    border-left: 1px solid var(--border);
}

.file-drop {
    position: relative;
    display: block;
    padding: 22px;
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    background: var(--surface-soft);
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.file-drop:hover,
.file-drop.is-dragover {
    border-color: var(--primary);
    background: #eff6ff;
    transform: translateY(-1px);
}

.file-drop.has-file {
    border-color: var(--success);
    background: var(--success-soft);
}

.file-input-native {
    position: absolute;
    width: 1px;
    min-height: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.file-picker-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.file-select-button {
    margin-top: 0;
}

.file-selected-name {
    color: var(--text);
    font-weight: 600;
}

.file-drop-name {
    margin-top: 12px;
    padding: 9px 11px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(203, 213, 225, 0.8);
}

.empty-state {
    padding: 28px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    background: var(--surface-soft);
    text-align: center;
}

details {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    padding: 14px 16px;
}

summary {
    cursor: pointer;
    font-weight: 800;
}

.checkbox-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 10px;
    padding: 16px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--surface);
    cursor: pointer;
}

.checkbox-card:hover {
    border-color: var(--primary);
    background: #eff6ff;
}

.checkbox-card input {
    width: 20px;
    min-height: 20px;
    margin-top: 2px;
    accent-color: var(--primary);
}

.checkbox-card strong {
    display: block;
}

.checkbox-card span {
    display: block;
}

.equal-cards {
    align-items: stretch;
}

.equal-cards > .card,
.equal-cards > .hero {
    height: 100%;
    margin-bottom: 0;
}

.auth-grid {
    align-items: stretch;
}

.auth-grid > .hero,
.auth-grid > .card {
    height: 100%;
    margin-bottom: 0;
}

.auth-note {
    margin-top: 18px;
}

.form-note {
    margin-top: 16px;
}

.profile-details {
    display: grid;
    gap: 12px;
}

.profile-row {
    display: grid;
    grid-template-columns: minmax(160px, 0.35fr) minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.profile-row span {
    color: var(--text-muted);
    font-weight: 700;
}

.profile-row strong {
    word-break: break-word;
}

.profile-field strong {
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.15;
    letter-spacing: -0.03em;
    word-break: break-word;
}

.rag-status-details {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

.rag-status-card {
    width: 100%;
    margin-bottom: 0;
}

.rag-management-grid {
    align-items: stretch;
}

.rag-management-grid > .card {
    height: 100%;
    margin-bottom: 0;
}

.storage-card {
    display: flex;
    flex-direction: column;
}

.storage-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.storage-metrics-grid .metric-card:last-child {
    grid-column: 1 / -1;
}

.storage-card .info {
    margin-top: 18px;
}

.rag-sources-table th {
    text-align: center;
    vertical-align: middle;
}

.rag-sources-table td:nth-child(3),
.rag-sources-table td:nth-child(4),
.rag-sources-table td:nth-child(5),
.rag-sources-table td:nth-child(6),
.rag-sources-table td:nth-child(7) {
    text-align: center;
    vertical-align: middle;
}

.actions-cell {
    min-width: 150px;
}

.table-actions {
    display: grid;
    gap: 10px;
    width: 100%;
}

.table-actions form,
.table-actions button {
    width: 100%;
    margin: 0;
}

.table-actions button {
    min-height: 38px;
}

.site-footer {
    width: 100%;
    margin: 48px 0 0;
    padding: 0;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.94);
    color: var(--text-muted);
    font-size: 14px;
}

.site-footer-inner {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 26px;
}

.footer-main {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(160px, 1fr));
    gap: 28px;
    text-align: left;
}

.footer-brand p {
    max-width: 360px;
    margin-top: 10px;
    color: var(--text-muted);
}

.footer-logo {
    color: var(--text);
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-column h3 {
    margin-bottom: 6px;
    color: var(--text);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.footer-column a {
    color: var(--text-muted);
    font-weight: 700;
}

.footer-column a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

.footer-icon-link,
.footer-socials a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-icon-link img,
.footer-socials img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-socials a {
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
}

.footer-socials a:hover {
    background: var(--primary-soft);
    border-color: rgba(37, 99, 235, 0.28);
}

.footer-copy {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    text-align: right;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 22px;
    text-align: left;
}

.footer-grid p {
    margin-top: 8px;
    color: var(--text-muted);
}

.footer-separator {
    margin: 0 8px;
    color: var(--text-muted);
}

.footer-card {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 28px;
    padding: clamp(22px, 4vw, 34px);
    border: 1px solid rgba(219, 227, 239, 0.92);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-sm);
}

.footer-card h2 {
    margin-top: 12px;
}

.footer-contacts {
    align-self: center;
}

@media (max-width: 980px) {
    .grid.four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 860px) {
    .site-nav {
        align-items: flex-start;
        flex-wrap: wrap;
        min-height: auto;
        padding: 14px 0;
    }

    .brand-group {
        width: calc(100% - 88px);
    }

    .header-check-link {
        width: fit-content;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding-top: 10px;
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-links a,
    .nav-links .badge {
        justify-content: center;
        width: 100%;
    }

    .grid.two,
    .grid.three {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
    }

    .footer-grid,
    .footer-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .issue-card-wide {
        grid-template-columns: 1fr;
    }

    .issue-side {
        padding-left: 0;
        border-left: 0;
        border-top: 1px solid var(--border);
        padding-top: 16px;
    }

    .storage-metrics-grid {
        grid-template-columns: 1fr;
    }

    .storage-metrics-grid .metric-card:last-child {
        grid-column: auto;
    }
}

@media (max-width: 720px) {
    .hero {
        padding: 24px;
    }

    .metric-card strong,
    .metric-value {
        font-size: 22px;
        word-break: break-word;
    }

    .table-wrap {
        border-radius: 14px;
    }

    .table-wrap table {
        min-width: 760px;
    }

    .file-drop {
        padding: 18px;
    }
}

@media (max-width: 560px) {
    .page-shell,
    .site-nav,
    .site-footer-inner {
        width: min(100% - 20px, var(--container));
    }

    .card,
    .hero {
        border-radius: 18px;
    }

    button,
    .button,
    .form-actions button,
    .form-actions .button {
        width: 100%;
    }

    h1 {
        font-size: 30px;
    }

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

    .profile-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .file-picker-row {
        align-items: stretch;
        gap: 10px;
    }

    .footer-main {
        grid-template-columns: 1fr;
    }

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

    .footer-copy {
        text-align: left;
    }
}

@media (max-width: 420px) {
    .brand {
        font-size: 15px;
    }

    .brand-logo {
        width: 28px;
        height: 28px;
        border-radius: 10px;
    }

    .brand-logo img {
        width: 17px;
        height: 17px;
    }

    .nav-toggle {
        min-height: 36px;
        padding: 7px 10px;
        font-size: 14px;
    }

    .page-shell {
        margin-top: 20px;
    }

    .hero,
    .card {
        padding: 18px;
    }
}

.profile-logout {
    margin-top: 18px;
}

.rag-management-grid {
    align-items: stretch;
}

.rag-management-grid > .card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
    margin-bottom: 0;
}

.storage-card {
    display: flex;
    flex-direction: column;
}

.storage-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.storage-metrics-grid .metric-card {
    min-height: 96px;
}

.storage-metrics-grid .metric-card:last-child {
    grid-column: 1 / -1;
}

.storage-card .info {
    margin-top: 18px;
}

.grid > .card,
.grid > .hero {
    margin-top: 0;
}

.rag-management-grid {
    align-items: stretch;
}

.rag-management-grid > .card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
    margin-top: 0;
    margin-bottom: 0;
}

.auth-grid {
    align-items: stretch;
}

.auth-grid > .hero,
.auth-grid > .card {
    height: 100%;
    margin-top: 0;
    margin-bottom: 0;
}

.storage-card {
    display: flex;
    flex-direction: column;
}

.storage-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.storage-metrics-grid .metric-card {
    min-height: 96px;
}

.storage-metrics-grid .metric-card:last-child {
    grid-column: 1 / -1;
}

.storage-card .info {
    margin-top: 18px;
}

.footer-main-auth {
    grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr);
}

@media (max-width: 560px) {
    .footer-main-auth {
        grid-template-columns: 1fr;
    }
}

.footer-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: fit-content;
    min-height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-weight: 700;
    line-height: 1.55;
    box-shadow: none;
    cursor: pointer;
    text-align: left;
}

.footer-link-button:hover,
.footer-link-button:focus {
    color: var(--primary-dark);
    background: transparent;
    box-shadow: none;
    transform: none;
    text-decoration: none;
}

.footer-link-button img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.contact-modal[hidden] {
    display: none;
}

.contact-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: grid;
    place-items: center;
    padding: 20px;
}

.contact-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.36);
    backdrop-filter: blur(10px);
}

.contact-modal-x {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 28px;
    font-weight: 400;
    line-height: 1;
    box-shadow: none;
    cursor: pointer;
}

.contact-modal-x:hover,
.contact-modal-x:focus {
    background: transparent;
    color: #64748b;
    box-shadow: none;
    transform: none;
    outline: none;
}

.contact-modal-close {
    margin-top: 0;
}

.contact-modal-card .section-header {
    padding-right: 44px;
}

.modal-open {
    overflow: hidden;
}

.vacancy-relevance-grid {
    align-items: stretch;
}

.vacancy-relevance-grid > .vacancy-relevance-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 124px;
    margin-top: 0;
    margin-bottom: 0;
}

.vacancy-relevance-card h3 {
    margin-bottom: 10px;
}

.vacancy-relevance-list {
    margin: 0;
    padding-left: 20px;
}

.vacancy-relevance-list li + li {
    margin-top: 6px;
}

@media (max-width: 860px) {
    .vacancy-relevance-grid > .vacancy-relevance-card {
        min-height: auto;
    }
}
.summary-alert {
    margin-top: 18px;
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid transparent;
    font-weight: 700;
    line-height: 1.5;
}

.summary-alert-success {
    background: #e8f8ee;
    border-color: #b9e7c8;
    color: #167c3a;
}

.summary-alert-warning {
    background: #fff4e5;
    border-color: #ffd39a;
    color: #b86100;
}

.summary-alert-danger {
    background: #fdecec;
    border-color: #f3b3b3;
    color: #b42318;
}

.vacancy-relevance-grid {
    align-items: stretch;
}

.vacancy-relevance-grid > .card.compact.vacancy-relevance-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 124px;
    margin-top: 0;
    margin-bottom: 0;
}

.vacancy-relevance-list {
    margin: 0;
    padding-left: 20px;
}

.vacancy-relevance-list li + li {
    margin-top: 6px;
}

.status-pill.report-status-success,
.badge.report-status-success {
    color: #167c3a;
    background: #e8f8ee;
    border: 1px solid #b9e7c8;
}

.status-pill.report-status-warning,
.badge.report-status-warning {
    color: #b86100;
    background: #fff4e5;
    border: 1px solid #ffd39a;
}

.status-pill.report-status-danger,
.badge.report-status-danger {
    color: #b42318;
    background: #fdecec;
    border: 1px solid #f3b3b3;
}

.contact-form-status {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-weight: 700;
}

.contact-form-status.success {
    color: #167c3a;
    background: #e8f8ee;
    border-color: #b9e7c8;
}

.contact-form-status.error {
    color: #b42318;
    background: #fdecec;
    border-color: #f3b3b3;
}

.footer-social-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-height: 34px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    box-shadow: none;
    cursor: pointer;
}

.footer-social-button:hover,
.footer-social-button:focus {
    background: var(--primary-soft);
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: none;
    transform: none;
}

.footer-social-button img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.mobile-nav-backdrop {
    display: none;
}

body.mobile-nav-open {
    overflow: hidden;
}

@media (max-width: 860px) {
    .site-header {
        z-index: 90;
    }

    .site-nav {
        align-items: center;
        flex-wrap: nowrap;
        min-height: 64px;
        padding: 12px 0;
    }

    .brand-group {
        width: auto;
        max-width: calc(100% - 96px);
        flex: 1 1 auto;
    }

    .brand {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-toggle {
        position: relative;
        z-index: 140;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        width: auto;
        min-width: 96px;
        min-height: 40px;
        margin: 0;
        padding: 9px 16px;
        border: 1px solid rgba(37, 99, 235, 0.32);
        border-radius: 999px;
        background: var(--primary-soft);
        color: var(--primary-dark);
        box-shadow: none;
        font-weight: 800;
    }

    .nav-toggle:hover,
    .nav-toggle:focus,
    .nav-toggle:active,
    .nav-toggle[aria-expanded="true"] {
        background: #dbeafe;
        color: var(--primary-dark);
        border-color: rgba(37, 99, 235, 0.42);
        box-shadow: 0 10px 24px rgba(37, 99, 235, 0.16);
        transform: none;
        outline: none;
    }

    .nav-toggle[aria-expanded="true"] {
        position: fixed;
        top: 14px;
        left: 18px;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 130;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 10px;
        width: min(330px, calc(100vw - 46px));
        max-width: 88vw;
        height: 100dvh;
        padding: 76px 18px 24px;
        border-right: 1px solid rgba(219, 227, 239, 0.95);
        border-radius: 0 26px 26px 0;
        background:
            radial-gradient(circle at top left, rgba(37, 99, 235, 0.13), transparent 18rem),
            rgba(255, 255, 255, 0.98);
        box-shadow: 24px 0 48px rgba(15, 23, 42, 0.18);
        backdrop-filter: blur(18px);
        overflow-y: auto;
        flex-wrap: nowrap;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateX(calc(-100% - 24px));
        transition:
            transform 0.24s ease,
            opacity 0.2s ease,
            visibility 0.2s ease;
    }

    .nav-links::before {
        content: "Навигация";
        display: block;
        margin: 0 0 8px;
        color: var(--text);
        font-size: 22px;
        font-weight: 900;
        letter-spacing: -0.03em;
    }

    .nav-links.is-open {
        display: flex;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(0);
    }

    .nav-links a,
    .nav-links .badge {
        justify-content: flex-start;
        width: 100%;
        min-height: 48px;
        padding: 12px 14px;
        border: 1px solid rgba(219, 227, 239, 0.92);
        border-radius: 16px;
        background: rgba(248, 250, 252, 0.92);
        color: var(--text-muted);
        font-size: 15px;
        font-weight: 800;
    }

    .nav-links a:hover,
    .nav-links a:focus {
        color: var(--primary-dark);
        background: var(--primary-soft);
        border-color: rgba(37, 99, 235, 0.24);
        text-decoration: none;
        outline: none;
    }

    .nav-links .badge {
        justify-content: center;
        margin-top: 8px;
        color: var(--primary-dark);
        background: var(--primary-soft);
        border-color: rgba(37, 99, 235, 0.24);
    }

    .mobile-nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 120;
        display: block;
        background: rgba(15, 23, 42, 0.38);
        backdrop-filter: blur(7px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition:
            opacity 0.22s ease,
            visibility 0.22s ease;
    }

    body.mobile-nav-open .mobile-nav-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

@media (min-width: 861px) {
    .mobile-nav-backdrop {
        display: none;
    }

    body.mobile-nav-open {
        overflow: auto;
    }
}

@media (max-width: 560px) {
    .nav-toggle,
    .nav-toggle[aria-expanded="true"] {
        width: auto;
    }

    .nav-toggle[aria-expanded="true"] {
        left: 14px;
    }

    .nav-links {
        width: min(310px, calc(100vw - 34px));
        padding-inline: 16px;
    }
}
@media (max-width: 860px) {
    .site-header {
        z-index: 220;
    }

    .site-nav {
        position: relative;
        z-index: 230;
    }

    .nav-toggle {
        position: relative;
        z-index: 260;
        background: var(--primary-soft);
        color: var(--primary-dark);
        border-color: rgba(37, 99, 235, 0.34);
    }

    .nav-toggle:hover,
    .nav-toggle:focus,
    .nav-toggle:active,
    .nav-toggle[aria-expanded="true"] {
        background: var(--primary-soft);
        color: var(--primary-dark);
        border-color: rgba(37, 99, 235, 0.44);
        box-shadow: 0 10px 24px rgba(37, 99, 235, 0.16);
        transform: none;
        outline: none;
    }

    .nav-toggle[aria-expanded="true"] {
        position: fixed;
        top: 14px;
        left: 18px;
    }

    .mobile-nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 180;
        display: block;
        background: rgba(15, 23, 42, 0.38);
        backdrop-filter: blur(6px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition:
            opacity 0.22s ease,
            visibility 0.22s ease;
    }

    body.mobile-nav-open .mobile-nav-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 250;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 10px;

        width: min(320px, calc(100vw - 42px));
        max-width: 88vw;
        height: 100dvh;

        padding: 76px 18px 24px;
        border-right: 1px solid rgba(219, 227, 239, 0.95);
        border-radius: 0 26px 26px 0;

        background:
            radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 18rem),
            rgba(255, 255, 255, 0.98);

        box-shadow: 24px 0 48px rgba(15, 23, 42, 0.2);
        backdrop-filter: blur(18px);

        overflow-y: auto;
        flex-wrap: nowrap;

        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateX(calc(-100% - 24px));

        transition:
            transform 0.24s ease,
            opacity 0.2s ease,
            visibility 0.2s ease;
    }

    .nav-links.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(0);
    }

    .nav-links::before {
        content: "Навигация";
        display: block;
        margin: 0 0 8px;
        color: var(--text);
        font-size: 22px;
        font-weight: 900;
        letter-spacing: -0.03em;
    }

    .nav-links a,
    .nav-links .badge {
        justify-content: flex-start;
        width: 100%;
        min-height: 48px;
        padding: 12px 14px;
        border: 1px solid rgba(219, 227, 239, 0.92);
        border-radius: 16px;
        background: rgba(248, 250, 252, 0.96);
        color: var(--text-muted);
        font-size: 15px;
        font-weight: 800;
    }

    .nav-links a:hover,
    .nav-links a:focus {
        color: var(--primary-dark);
        background: var(--primary-soft);
        border-color: rgba(37, 99, 235, 0.24);
        text-decoration: none;
        outline: none;
    }

    .nav-links .badge {
        justify-content: center;
        margin-top: 8px;
        color: var(--primary-dark);
        background: var(--primary-soft);
        border-color: rgba(37, 99, 235, 0.24);
    }
}

@media (max-width: 560px) {
    .nav-toggle,
    .nav-toggle[aria-expanded="true"] {
        width: auto;
    }

    .nav-toggle[aria-expanded="true"] {
        left: 14px;
    }

    .nav-links {
        width: min(310px, calc(100vw - 34px));
        padding-inline: 16px;
    }
}

.landing-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--primary-dark);
    font-size: 14px;
    font-weight: 900;
}

.landing-badge img,
.landing-actions img {
    width: 18px;
    height: 18px;
    display: block;
    flex: 0 0 auto;
}

.landing-actions .button:not(.ghost) img {
    filter: none;
}

.landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
    gap: 34px;
    align-items: center;
    padding: clamp(34px, 6vw, 76px);
    border: 1px solid rgba(191, 219, 254, 0.92);
    border-radius: 34px;
    background:
        radial-gradient(circle at 12% 18%, rgba(37, 99, 235, 0.16), transparent 25rem),
        radial-gradient(circle at 82% 0%, rgba(124, 58, 237, 0.2), transparent 24rem),
        linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(239, 246, 255, 0.98));
    box-shadow: var(--shadow-md);
}

.landing-hero-content h1 {
    max-width: 860px;
    margin-top: 18px;
    font-size: clamp(38px, 5.6vw, 70px);
    letter-spacing: -0.065em;
}

.landing-hero-content h1 span {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.landing-hero-content p {
    max-width: 780px;
    color: var(--text-muted);
    font-size: 19px;
}

.landing-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 26px;
}

.landing-actions .button {
    margin-top: 0;
}

.landing-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.landing-trust-row span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 12px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 850;
}

.landing-hero-panel {
    display: flex;
    justify-content: center;
}

.landing-report-card {
    width: 100%;
    max-width: 430px;
    padding: 24px;
    border: 1px solid rgba(203, 213, 225, 0.92);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

.landing-report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.landing-score-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.landing-score-grid div {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface-soft);
}

.landing-score-grid strong {
    display: block;
    font-size: 30px;
    line-height: 1;
}

.landing-score-grid span {
    display: block;
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 850;
}

.landing-evidence {
    display: grid;
    gap: 6px;
    margin-top: 18px;
    padding: 14px;
    border-left: 4px solid var(--primary);
    border-radius: 14px;
    background: #eff6ff;
}

.landing-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.landing-section {
    margin-top: 76px;
}

.landing-centered {
    justify-content: center;
    text-align: center;
}

.landing-centered p {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.landing-feature-grid,
.landing-role-grid {
    display: grid;
    gap: 22px;
    margin-top: 28px;
}

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

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

.landing-feature-card {
    height: 100%;
    margin-bottom: 0;
}

.landing-feature-card p,
.landing-role-card p,
.landing-step p {
    color: var(--text-muted);
}

.landing-icon,
.landing-role-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    border-radius: 16px;
}

.landing-icon {
    width: 52px;
    height: 52px;
}

.landing-icon img {
    width: 26px;
    height: 26px;
}

.landing-icon-indigo {
    background: #e0e7ff;
    color: #4f46e5;
}

.landing-icon-purple {
    background: #ede9fe;
    color: #7c3aed;
}

.landing-icon-amber {
    background: #fef3c7;
    color: #d97706;
}

.landing-icon-green {
    background: #dcfce7;
    color: #16a34a;
}

.landing-icon-red {
    background: #fee2e2;
    color: #dc2626;
}

.landing-icon-blue {
    background: #dbeafe;
    color: #2563eb;
}

.landing-how {
    padding: clamp(28px, 4vw, 44px);
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.95), rgba(238, 246, 255, 0.95));
}

.landing-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.landing-step {
    position: relative;
    height: 100%;
    margin-bottom: 0;
}

.landing-step > span {
    position: absolute;
    top: -14px;
    left: -10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.26);
}

.landing-step > img {
    width: 34px;
    height: 34px;
    margin: 12px 0 16px;
}

.landing-role-card {
    position: relative;
    height: 100%;
    margin-bottom: 0;
}

.landing-role-card ul {
    display: grid;
    gap: 12px;
    margin: 24px 0 28px;
    padding: 0;
    list-style: none;
}

.landing-role-card li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.landing-role-card li img {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
    margin-top: 1px;
}

.landing-role-icon {
    width: 64px;
    height: 64px;
}

.landing-role-icon img {
    width: 32px;
    height: 32px;
    filter: brightness(0) invert(1);
}

.landing-gradient-indigo {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.landing-gradient-green {
    background: linear-gradient(135deg, #16a34a, #0f766e);
}

.landing-gradient-dark {
    background: linear-gradient(135deg, #334155, #0f172a);
}

.landing-role-popular {
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-md);
}

.landing-popular-label {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--success-soft);
    color: var(--success);
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.landing-final-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 76px;
    padding: clamp(30px, 5vw, 52px);
    border-radius: 30px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

.landing-final-cta h2 {
    color: #ffffff;
}

.landing-final-cta p {
    max-width: 740px;
    color: rgba(255, 255, 255, 0.82);
}

.landing-final-cta .button.ghost {
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.landing-final-cta .button.ghost:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

@media (max-width: 980px) {
    .landing-hero,
    .landing-feature-grid,
    .landing-role-grid {
        grid-template-columns: 1fr;
    }

    .landing-hero-panel {
        justify-content: flex-start;
    }

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

    .landing-final-cta {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 560px) {
    .landing-hero {
        padding: 22px;
        border-radius: 22px;
    }

    .landing-hero-content h1 {
        font-size: 34px;
    }

    .landing-actions,
    .landing-actions .button {
        width: 100%;
    }

    .landing-trust-row {
        flex-direction: column;
    }

    .landing-trust-row span {
        width: 100%;
        justify-content: center;
    }

    .landing-score-grid,
    .landing-stats,
    .landing-steps {
        grid-template-columns: 1fr;
    }

    .landing-how,
    .landing-final-cta {
        border-radius: 22px;
    }
}

/* Header / desktop auth menu */

.brand {
    gap: 12px;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.brand-title {
    color: var(--text);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.brand-subtitle {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: 0;
}

.nav-auth-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 12px 22px;
    border-radius: 9px;
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
}

.nav-auth-link.nav-signin {
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.nav-auth-link.nav-signin:hover {
    background: var(--surface-soft);
    color: var(--primary-dark);
    text-decoration: none;
}

.nav-auth-link.nav-register {
    border: 1px solid transparent;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
}

.nav-auth-link.nav-register:hover {
    color: var(--primary-dark);
    text-decoration: none;
    transform: translateY(-1px);
}

/* Force desktop menu to stay visible */

@media (min-width: 861px) {
    .site-nav {
        min-height: 70px;
    }

    .nav-toggle {
        display: none !important;
    }

    .nav-links {
        position: static !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 14px !important;
        width: auto !important;
        max-width: none !important;
        height: auto !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: none !important;
        overflow: visible !important;
    }

    .nav-links::before {
        display: none !important;
        content: none !important;
    }
}

/* Mobile menu remains a drawer */

@media (max-width: 860px) {
    .brand-subtitle {
        display: none;
    }

    .brand-title {
        font-size: 15px;
    }

    .nav-toggle {
        display: inline-flex !important;
    }
}

/* Contact modal */

.contact-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
}

.contact-modal[hidden] {
    display: none;
}

.contact-modal-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(15, 23, 42, 0.36);
    backdrop-filter: blur(10px);
}

.contact-modal-card {
    position: relative;
    z-index: 1;
    width: min(620px, 100%);
    max-height: min(760px, calc(100dvh - 40px));
    overflow-y: auto;
    padding: clamp(22px, 3vw, 32px);
    border: 1px solid rgba(219, 227, 239, 0.92);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.contact-modal-card .section-header {
    padding-right: 46px;
}

.contact-modal-x {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-height: 34px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.96);
    color: #94a3b8;
    font-size: 26px;
    font-weight: 500;
    line-height: 1;
    box-shadow: none;
    cursor: pointer;
}

.contact-modal-x:hover,
.contact-modal-x:focus {
    background: #f1f5f9;
    color: #64748b;
    box-shadow: none;
    transform: none;
    outline: none;
}

.contact-modal-x {
    position: absolute !important;
    top: 16px !important;
    right: 18px !important;
    z-index: 2 !important;

    display: block !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;

    color: #94a3b8 !important;
    font-size: 30px !important;
    font-weight: 400 !important;
    line-height: 1 !important;

    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

.contact-modal-x:hover,
.contact-modal-x:focus,
.contact-modal-x:active {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #64748b !important;
    transform: none !important;
    outline: none !important;
}

/* Reports: recent cards and history table */

.recent-reports-list {
    display: grid;
    gap: 16px;
}

.recent-report-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 16px;
    border-radius: 12px;
    background: #f8fafc;
}

.recent-report-main {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.recent-report-main strong {
    color: var(--text);
    font-size: 15px;
    word-break: break-word;
}

.recent-report-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 14px;
}

.recent-report-side {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

.report-issues-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.issue-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.issue-count-critical {
    border: 1px solid #fecaca;
    background: #fee2e2;
    color: #dc2626;
}

.issue-count-major {
    border: 1px solid #fde68a;
    background: #fef3c7;
    color: #d97706;
}

.issue-count-minor {
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
    color: #475569;
}

.issue-count-ready {
    border: 1px solid #bbf7d0;
    background: #dcfce7;
    color: #15803d;
}

.report-action-button {
    min-height: 40px;
    margin-top: 0;
    padding: 9px 16px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: #ffffff;
    color: var(--text);
    box-shadow: none;
    font-size: 14px;
}

.report-action-button img {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.report-action-button:hover {
    background: #f8fafc;
    color: var(--primary-dark);
    box-shadow: none;
    transform: none;
}

.reports-history-wrap {
    border-radius: 0 0 22px 22px;
}

.reports-history-table {
    min-width: 920px;
}

.reports-history-table th {
    padding: 18px 22px;
    background: #ffffff;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
    text-transform: none;
    letter-spacing: 0;
}

.reports-history-table td {
    padding: 18px 22px;
    background: #ffffff;
    vertical-align: middle;
}

.reports-history-table tr:hover td {
    background: #fbfdff;
}

.reports-history-document {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reports-history-document img {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.reports-history-document strong {
    color: var(--text);
    font-size: 15px;
}

.report-row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 760px) {
    .recent-report-row {
        align-items: stretch;
        flex-direction: column;
    }

    .recent-report-side {
        justify-content: flex-start;
    }

    .report-action-button {
        width: 100%;
    }
}

.reports-history-card {
    padding: 0;
    overflow: hidden;
}

.reports-history-card .section-header {
    padding: 22px 24px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border);
}

/* Report issue sections */

.report-issue-section {
    padding: clamp(24px, 3vw, 34px);
    border-left: 0;
}

.report-issue-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.report-issue-section-header img {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
}

.report-issue-section-header h2 {
    margin-bottom: 6px;
}

.report-issue-section-header p {
    margin: 0;
    color: var(--text-muted);
}

.report-issue-section-critical .report-issue-section-header h2 {
    color: #991b1b;
}

.report-issue-section-major .report-issue-section-header h2 {
    color: #172033;
}

.report-issue-section-minor .report-issue-section-header h2 {
    color: #172033;
}

.report-issue-list {
    display: grid;
    gap: 18px;
}

.report-issue-card {
    padding: 18px 16px;
    border-radius: 10px;
}

.report-issue-card-critical {
    border: 1px solid #fca5a5;
    background: #fef2f2;
}

.report-issue-card-major {
    border: 1px solid #facc15;
    background: #fffbeb;
}

.report-issue-card-minor {
    border: 1px solid #bfdbfe;
    background: #eff6ff;
}

.report-issue-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.report-issue-title-row h3 {
    margin: 0;
    font-size: 16px;
}

.issue-level-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.issue-level-critical {
    border: 1px solid #fecaca;
    background: #fee2e2;
    color: #dc2626;
}

.issue-level-major {
    border: 1px solid #fde68a;
    background: #fef3c7;
    color: #d97706;
}

.issue-level-minor {
    border: 1px solid #bfdbfe;
    background: #dbeafe;
    color: #2563eb;
}

.report-issue-card p {
    margin: 0 0 14px;
    color: var(--text);
}

.report-evidence-box {
    padding: 13px 14px;
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 6px;
    background: #ffffff;
    color: #334155;
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: 14px;
    line-height: 1.45;
}

.report-fix-box {
    display: grid;
    gap: 6px;
    margin-top: 12px;
    padding: 13px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--text);
}

@media (max-width: 560px) {
    .report-issue-section-header {
        align-items: flex-start;
    }

    .report-issue-title-row {
        align-items: flex-start;
        flex-direction: column;
    }
}