:root {
    --legal-ink: #0f172a;
    --legal-muted: #475569;
    --legal-border: #e2e8f0;
    --legal-bg: #f1f5f9;
    --legal-card: #ffffff;
    --legal-primary: #4f46e5;
    --legal-primary-soft: #eef2ff;
    --legal-header: #0f172a;
    --legal-radius: 16px;
    --font: "Public Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    background: var(--legal-bg);
    color: var(--legal-ink);
    min-height: 100vh;
    line-height: 1.65;
}

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

a:hover {
    text-decoration: underline;
}

.legal-header {
    background: var(--legal-header);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

.legal-header-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.legal-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.2px;
    text-decoration: none;
}

.legal-brand img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.legal-brand:hover {
    text-decoration: none;
    color: #fff;
}

.legal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.legal-nav a {
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 999px;
    text-decoration: none;
}

.legal-nav a:hover,
.legal-nav a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.legal-nav a.active {
    background: var(--legal-primary);
}

.legal-main {
    max-width: 860px;
    margin: 0 auto;
    padding: 28px 16px 48px;
}

.legal-card {
    background: var(--legal-card);
    border: 1px solid var(--legal-border);
    border-radius: var(--legal-radius);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    padding: 36px 32px 48px;
}

.legal-body h1 {
    font-size: clamp(1.55rem, 3vw, 2rem);
    line-height: 1.25;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.legal-body h1 + p {
    margin: 0 0 28px;
    color: var(--legal-muted);
    font-size: 0.92rem;
    font-weight: 600;
}

.legal-body h2 {
    font-size: 1.2rem;
    margin: 36px 0 12px;
    padding-top: 8px;
    border-top: 1px solid var(--legal-border);
}

.legal-body h2:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.legal-body h3 {
    font-size: 1.02rem;
    margin: 24px 0 8px;
    color: #1e293b;
}

.legal-body p {
    margin: 0 0 12px;
    color: #1e293b;
}

.legal-body ul {
    margin: 0 0 16px;
    padding-left: 1.3rem;
}

.legal-body li {
    margin: 0 0 6px;
}

.legal-body li::marker {
    color: var(--legal-primary);
}

.legal-body address {
    font-style: normal;
    margin: 0 0 16px;
}

.legal-body address p {
    margin: 0 0 2px;
}

.legal-footer {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 16px 48px;
    color: var(--legal-muted);
    font-size: 0.85rem;
    text-align: center;
}

.legal-footer p {
    margin: 0 0 4px;
}

.legal-intro {
    margin: 0 0 24px;
}

.legal-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    margin: 0 0 20px;
    font-size: 0.95rem;
}

.legal-alert-success {
    background: #ecfdf5;
    color: #065f46;
}

.legal-alert-error {
    background: #fef2f2;
    color: #991b1b;
}

.legal-form {
    display: grid;
    gap: 16px;
    position: relative;
}

.legal-honeypot {
    position: absolute;
    left: -9999px;
    height: 0;
    overflow: hidden;
}

.legal-field label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.legal-optional {
    font-weight: 400;
    color: var(--legal-muted);
    font-size: 0.8rem;
}

.legal-field input,
.legal-field select,
.legal-field textarea {
    width: 100%;
    border: 1px solid var(--legal-border);
    border-radius: 10px;
    padding: 11px 12px;
    font: inherit;
    color: var(--legal-ink);
    background: #fff;
}

.legal-field textarea {
    resize: vertical;
    min-height: 140px;
}

.legal-field input:focus,
.legal-field select:focus,
.legal-field textarea:focus {
    outline: 2px solid #c7d2fe;
    border-color: var(--legal-primary);
}

.legal-field .is-invalid {
    border-color: #ef4444;
}

.legal-error {
    display: block;
    color: #dc2626;
    font-size: 0.82rem;
    margin-top: 6px;
}

.legal-submit {
    justify-self: start;
    background: var(--legal-primary);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 12px 22px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.legal-submit:hover {
    background: #4338ca;
}

.legal-submit-danger {
    background: #dc2626;
}

.legal-submit-danger:hover {
    background: #b91c1c;
}

.account-delete-page .legal-header-inner,
.account-delete-page .legal-footer,
.account-delete-main {
    max-width: 1120px;
}

.account-delete-page .legal-header-inner {
    justify-content: flex-start;
}

.delete-intro {
    margin: 0 0 24px;
}

.delete-kicker {
    display: inline-block;
    margin: 0 0 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--legal-primary-soft);
    color: var(--legal-primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.delete-intro h1 {
    font-size: clamp(1.55rem, 3vw, 2.1rem);
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
}

.delete-intro p {
    margin: 0;
    max-width: 62ch;
    color: var(--legal-muted);
}

.delete-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.delete-card .legal-body h2 {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.delete-card-lead {
    color: var(--legal-muted);
    margin: 0 0 20px;
}

.delete-card .legal-field textarea {
    min-height: 100px;
}

.delete-warning {
    margin: 0;
    color: #991b1b;
    font-size: 0.9rem;
    font-weight: 600;
}

.delete-steps {
    margin: 0 0 20px;
    padding-left: 1.2rem;
}

.delete-steps li {
    margin: 0 0 14px;
}

.delete-shot-link {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 6px;
    margin: 8px 0 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--legal-primary);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.delete-shot-link:hover {
    text-decoration: underline;
}

.delete-shot-link i {
    font-size: 0.95rem;
}

body.delete-modal-open {
    overflow: hidden;
}

.delete-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.delete-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
}

.delete-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
}

.delete-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--legal-border);
}

.delete-modal-header h3 {
    margin: 0;
    font-size: 0.98rem;
}

.delete-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: var(--legal-bg);
    color: var(--legal-ink);
    cursor: pointer;
}

.delete-modal-close:hover {
    background: #e2e8f0;
}

.delete-modal-dialog img {
    display: block;
    width: 100%;
    height: auto;
}

@media (max-width: 900px) {
    .delete-grid {
        grid-template-columns: 1fr;
    }
}

.legal-form-note {
    margin-top: 24px;
    color: var(--legal-muted);
    font-size: 0.92rem;
}

@media (max-width: 640px) {
    .legal-header-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 16px 12px;
    }

    .legal-nav {
        width: 100%;
    }

    .legal-nav a {
        flex: 1;
        text-align: center;
        font-size: 0.8rem;
        padding: 8px 10px;
    }

    .legal-card {
        padding: 24px 18px 32px;
        border-radius: 12px;
    }
}
