:root {
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

body.site-content-page {
    margin: 0;
    overflow-x: hidden;
    background: var(--game-life-bg);
    color: var(--game-life-ink);
    font-family: system-ui, sans-serif;
    line-height: 1.75;
}

.legal-nav {
    width: min(calc(100% - 32px), 860px);
    margin-inline: auto;
}

.legal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    padding-block: 18px;
    font-size: 0.94rem;
}

.legal-nav a,
.legal-main a:not(.pm-button) {
    color: #8fbbff;
}

.legal-main {
    width: 100%;
}

.account-panel,
.account-alert {
    box-sizing: border-box;
    width: min(100%, 860px);
    margin-bottom: 16px;
    padding: 22px;
    border: 1px solid var(--game-life-line);
    border-radius: 7px;
    background: var(--game-life-surface);
    box-shadow: 0 16px 35px rgb(0 0 0 / 16%);
}

.legal-document {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: clamp(28px, 4vw, 54px);
    border: 1px solid var(--game-life-line);
    border-radius: 7px;
    background: var(--game-life-surface);
    box-shadow: 0 16px 35px rgb(0 0 0 / 16%);
}

.legal-document__inner {
    width: min(100%, 820px);
    margin-inline: auto;
    text-align: left;
}

.legal-section {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.legal-section + .legal-section {
    margin-top: clamp(30px, 4vw, 46px);
}

.legal-section p,
.legal-section ul,
.legal-section ol {
    margin-top: 0;
    margin-bottom: 16px;
}

.legal-section ul,
.legal-section ol {
    padding-inline-start: 1.5em;
}

.legal-section li + li {
    margin-top: 6px;
}

.account-alert {
    margin-top: 0;
}

.account-page .account-panel,
.account-page .account-alert {
    width: 100%;
}

.account-alert.is-success {
    border-color: #28795a;
    color: #bff3d9;
}

.account-alert.is-error {
    border-color: #9c4953;
    color: #ffd9dd;
}

h1,
h2,
h3 {
    line-height: 1.35;
    letter-spacing: 0;
}

h1 {
    margin: 0 0 12px;
    font-size: clamp(1.8rem, 5vw, 2.7rem);
}

h2 {
    margin: 0 0 10px;
    font-size: 1.25rem;
}

p:last-child,
ul:last-child {
    margin-bottom: 0;
}

.meta-note,
.quiet {
    color: var(--game-life-muted);
    font-size: 0.92rem;
}

.notice,
.danger-panel {
    padding: 16px;
    border-left: 4px solid var(--game-life-amber);
    background: #261f15;
}

.danger-panel {
    border-left-color: #a12b3c;
    background: #25161b;
}

.account-page .danger-panel a.pm-button--danger-outline {
    color: #fff;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 15px;
    border: 1px solid var(--game-life-blue);
    border-radius: 6px;
    background: var(--game-life-blue);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
}

.button.secondary {
    border-color: var(--game-life-line);
    background: var(--game-life-surface-strong);
    color: var(--game-life-ink);
}

.button.tertiary {
    border-color: transparent;
    background: transparent;
    color: #8fbbff;
}

.button.danger {
    border-color: #9f1d33;
    background: #9f1d33;
}

.button:hover,
.button:focus-visible {
    filter: brightness(1.12);
}

.button:focus-visible,
.legal-main a:focus-visible,
.legal-main input:focus-visible,
.legal-main textarea:focus-visible,
.legal-main select:focus-visible {
    outline: 3px solid var(--site-focus);
    outline-offset: 2px;
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

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

.stack-form {
    display: grid;
    gap: 14px;
}

.stack-form label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.stack-form input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--game-life-line);
    border-radius: 6px;
    background: #0d1720;
    color: var(--game-life-ink);
    font: inherit;
}

.account-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin: 0;
}

.account-meta > div {
    padding: 12px;
    border: 1px solid var(--game-life-line);
    border-radius: 6px;
    background: #0d1720;
}

.account-meta dt {
    color: var(--game-life-muted);
    font-size: 0.85rem;
}

.account-meta dd {
    margin: 4px 0 0;
    overflow-wrap: anywhere;
    font-weight: 700;
}

.account-setting-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
}

.account-setting-links > div {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--game-life-line);
    border-radius: 6px;
    background: #0d1720;
}

.account-setting-links h3,
.account-setting-links p {
    margin-top: 0;
}

.legal-section table {
    width: 100%;
    border-collapse: collapse;
}

.legal-section th,
.legal-section td {
    padding: 10px 12px;
    border: 1px solid var(--game-life-line);
    text-align: left;
    vertical-align: top;
}

.legal-section th {
    background: var(--game-life-surface-strong);
}

.legal-document-meta {
    color: var(--game-life-text-muted);
    font-size: 0.9rem;
}

.legal-document-meta p {
    margin-block: 0.25rem;
}

@media (max-width: 560px) {
    .legal-document,
    .account-panel,
    .account-alert {
        padding: 17px;
    }

    .account-setting-links {
        grid-template-columns: 1fr;
    }
}
