* {
    box-sizing: border-box;
}

:root {
    --dm-legal-blue-dark: #0B234E;
    --dm-legal-blue: #12326D;
    --dm-legal-blue-light: #1A3F84;
    --dm-legal-header-bg: linear-gradient(135deg, var(--dm-legal-blue-dark) 0%, var(--dm-legal-blue) 52%, var(--dm-legal-blue-light) 100%);
}

body {
    margin: 0;
    color: #1f2937;
    background: #f3f4f6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.65;
}

a {
    color: #174ea6;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.legal-page {
    width: min(920px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 32px 0 48px;
}

.legal-backbar {
    display: flex;
    margin-bottom: 14px;
}

.legal-back-button {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 16px;
    color: #0b234e;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.legal-back-button:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.legal-back-button:focus-visible {
    outline: 3px solid rgba(18, 50, 109, 0.28);
    outline-offset: 2px;
}

.legal-hero {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 8px;
    margin-bottom: 24px;
    padding: 30px;
    color: #fff;
    background: var(--dm-legal-header-bg);
    border-radius: 8px;
}

.legal-hero h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.18;
}

.legal-hero p {
    max-width: 720px;
    margin: 0;
    color: #eff6ff;
}

.eyebrow {
    margin: 0;
    color: #bfdbfe;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.notice,
.legal-section {
    margin-top: 18px;
    padding: 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.notice {
    border-left: 4px solid #174ea6;
    background: #eff6ff;
}

.legal-section h2 {
    margin: 0 0 14px;
    color: #0b234e;
    font-size: 21px;
    line-height: 1.25;
}

.legal-section p {
    margin: 0 0 14px;
}

.legal-section p:last-child {
    margin-bottom: 0;
}

.legal-section ul {
    margin: 0;
    padding-left: 22px;
}

.legal-section li {
    margin-bottom: 8px;
}

table {
    width: 100%;
    margin: 12px 0 16px;
    border-collapse: collapse;
    font-size: 14px;
}

th,
td {
    padding: 12px;
    vertical-align: top;
    border: 1px solid #e5e7eb;
}

th {
    color: #374151;
    background: #f9fafb;
    text-align: left;
}

.legal-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 24px;
    color: #6b7280;
    font-size: 14px;
}

@media (max-width: 720px) {
    .legal-page {
        width: min(100% - 24px, 920px);
        padding-top: 20px;
    }

    .legal-hero,
    .notice,
    .legal-section {
        padding: 20px;
    }

    .legal-hero h1 {
        font-size: 28px;
    }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead {
        display: none;
    }

    tr {
        margin-bottom: 12px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        overflow: hidden;
    }

    td {
        border: 0;
        border-bottom: 1px solid #e5e7eb;
    }

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