:root {
    color-scheme: dark;
    --background: #09080c;
    --surface: #15121a;
    --surface-raised: #1d1824;
    --line: rgba(211, 202, 222, 0.16);
    --text: #eee9f2;
    --muted: #aaa1b2;
    --purple: #7547a5;
    --purple-bright: #a66ce0;
    --silver: #c7c2cc;
    --success: #7bc69a;
    --danger: #d27485;
    font-family: Georgia, "Times New Roman", serif;
    background: var(--background);
    color: var(--text);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 80% -20%, rgba(117, 71, 165, 0.28), transparent 42rem),
        linear-gradient(180deg, #100d14 0, var(--background) 32rem);
}

a {
    color: #c89af2;
    text-decoration: none;
}

a:hover,
a:focus-visible {
    color: #ead6fc;
}

.site-header {
    min-height: 4.75rem;
    padding: 0.9rem clamp(1rem, 4vw, 4rem);
    border-bottom: 1px solid var(--line);
    background: rgba(9, 8, 12, 0.9);
    backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    gap: 2rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 2.45rem;
    aspect-ratio: 1;
    border: 1px solid rgba(200, 154, 242, 0.5);
    background: linear-gradient(145deg, #291b36, #110d16);
    color: #d9b9f5;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.1rem;
    font-family: Arial, sans-serif;
    font-size: 0.88rem;
}

nav a {
    color: var(--silver);
}

.identity {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-family: Arial, sans-serif;
    font-size: 0.83rem;
}

.identity img {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 1px solid var(--line);
}

.identity form {
    margin: 0;
}

.link-button {
    border: 0;
    padding: 0;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
}

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

.page-shell {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 5rem) 0;
}

.hero {
    max-width: 52rem;
    padding: clamp(2rem, 6vw, 5rem) 0;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 1rem;
    font-size: clamp(2.4rem, 7vw, 5.4rem);
    line-height: 0.96;
    font-weight: 500;
    letter-spacing: -0.04em;
}

h2 {
    font-weight: 500;
}

h3,
dt,
.eyebrow,
.slot-label,
.access-badge,
.privacy-label {
    font-family: Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.11em;
}

.eyebrow,
.slot-label {
    color: #bd8be8;
    font-size: 0.72rem;
    font-weight: 700;
}

.hero > p:not(.eyebrow) {
    max-width: 42rem;
    color: var(--silver);
    font-size: 1.2rem;
    line-height: 1.7;
}

.primary-action,
.secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.9rem;
    padding: 0.7rem 1.2rem;
    border: 1px solid #8c5aba;
    background: linear-gradient(135deg, #6d3e97, #44235f);
    color: white;
    font-family: Arial, sans-serif;
    font-weight: 700;
}

.secondary-action {
    background: transparent;
}

.notice,
.privacy-label,
.access-badge {
    display: inline-block;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    font-size: 0.68rem;
}

.success-notice {
    width: 100%;
    margin-bottom: 1.25rem;
    border-color: rgba(123, 198, 154, 0.45);
    color: var(--success);
}

.page-heading,
.section-heading,
.record-header,
.record-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.record-actions,
.form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.compact-action {
    min-height: auto;
    padding: 0.4rem 0.7rem;
    font-size: 0.75rem;
}

.page-heading {
    margin-bottom: 2rem;
    align-items: end;
}

.page-heading h1 {
    margin-bottom: 0;
    font-size: clamp(2.2rem, 6vw, 4.5rem);
}

.panel,
.metric-card {
    border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(29, 24, 36, 0.96), rgba(18, 15, 22, 0.96));
    box-shadow: 0 1.4rem 4rem rgba(0, 0, 0, 0.22);
}

.panel {
    padding: clamp(1.25rem, 3vw, 2rem);
    margin-bottom: 1.4rem;
}

.narrow-panel {
    max-width: 42rem;
    margin: 4rem auto;
}

.metric-grid,
.record-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.metric-card {
    min-height: 9rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--text);
}

.metric-card span,
.metric-card small {
    color: var(--muted);
    font-family: Arial, sans-serif;
}

.metric-card strong {
    color: #dcc4f2;
    font-size: 2.8rem;
    font-weight: 400;
}

.record-grid .panel {
    margin-bottom: 0;
}

.character-card {
    overflow: hidden;
}

.character-image {
    width: calc(100% + clamp(2.5rem, 6vw, 4rem));
    max-height: 30rem;
    margin: 1.25rem calc(clamp(1.25rem, 3vw, 2rem) * -1);
    object-fit: cover;
    border-block: 1px solid var(--line);
    background: #08070a;
}

.status {
    padding: 0.35rem 0.55rem;
    border: 1px solid currentColor;
    font-family: Arial, sans-serif;
    font-size: 0.72rem;
}

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

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

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

dl div {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
}

dt {
    margin-bottom: 0.3rem;
    color: var(--muted);
    font-size: 0.66rem;
}

dd {
    margin: 0;
    line-height: 1.55;
}

.long-copy {
    margin-top: 1.4rem;
}

.long-copy h3 {
    margin: 1.2rem 0 0.45rem;
    color: var(--muted);
    font-size: 0.7rem;
}

.long-copy p,
.stacked-details dd {
    white-space: pre-wrap;
}

.compact-list > div {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.compact-list span,
.record-footer {
    color: var(--muted);
    font-family: Arial, sans-serif;
    font-size: 0.78rem;
}

.record-footer {
    margin-top: 1.4rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.clan-colour {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 2px solid var(--silver);
    background: var(--clan-colour);
    box-shadow: 0 0 1.2rem color-mix(in srgb, var(--clan-colour), transparent 35%);
}

.thief-card {
    border-color: rgba(166, 108, 224, 0.32);
}

.empty-state {
    color: var(--muted);
}

.dashboard-form {
    max-width: 58rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
}

.form-grid label {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    color: var(--silver);
    font-family: Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.form-grid label > span:first-child {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.form-grid small {
    color: var(--muted);
    font-weight: 400;
}

.form-grid .full-width {
    grid-column: 1 / -1;
}

input,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 0;
    padding: 0.78rem 0.85rem;
    background: rgba(7, 6, 9, 0.72);
    color: var(--text);
    font: inherit;
}

textarea {
    resize: vertical;
    line-height: 1.55;
}

input:focus,
textarea:focus {
    border-color: var(--purple-bright);
    outline: 2px solid rgba(166, 108, 224, 0.18);
    outline-offset: 1px;
}

.field-error,
.validation-summary {
    color: #ee9baa;
    font-family: Arial, sans-serif;
    font-size: 0.76rem;
}

.validation-summary:empty {
    display: none;
}

.validation-summary ul {
    margin-top: 0;
}

.form-actions {
    margin-top: 1.5rem;
}

button.primary-action {
    cursor: pointer;
}

footer {
    padding: 1.5rem;
    border-top: 1px solid var(--line);
    color: #77717c;
    text-align: center;
    font-family: Arial, sans-serif;
    font-size: 0.74rem;
}

@media (max-width: 850px) {
    .site-header {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 0.9rem 1.4rem;
    }

    nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.25rem;
    }

    .identity {
        margin-left: auto;
    }
}

@media (max-width: 560px) {
    .identity > span,
    .identity img {
        display: none;
    }

    .page-heading,
    .record-footer {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

    .form-grid .full-width {
        grid-column: auto;
    }
}
