:root {
    color-scheme: dark;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #101112;
    color: #f2f0e9;
    --accent: #bcf66c;
    --muted: #a4aaa4
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    min-height: 100dvh;
    display: flex;
    flex-direction: column
}

header,
footer {
    padding: 2rem clamp(1.25rem, 6vw, 6rem);
    display: flex;
    justify-content: space-between;
    gap: 1rem
}

header {
    border-bottom: 1px solid #30342f
}

.brand {
    font-weight: 800;
    letter-spacing: .12em;
    text-decoration: none
}

.brand .tagline {
    display: block;
    color: var(--muted);
    font-size: .7rem;
    letter-spacing: .02em;
    font-weight: 400;
    margin-top: .4rem
}

a {
    color: inherit;
    text-underline-offset: 4px
}

main {
    width: min(100%, 1000px);
    padding: clamp(3rem, 9vw, 7rem) clamp(1.25rem, 6vw, 5rem);
    margin: auto
}

h1 {
    font-size: clamp(2.5rem, 7vw, 5.3rem);
    line-height: 1.04;
    letter-spacing: -.055em;
    font-weight: 550;
    margin: 1.2rem 0 2rem
}

h2 {
    font-size: 1.3rem;
    margin-top: 2.5rem
}

.eyebrow {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .18em;
    color: var(--accent)
}

.lede {
    font-size: 1.2rem;
    line-height: 1.7;
    max-width: 32rem;
    color: #c6cbc3
}

.muted {
    color: var(--muted);
    line-height: 1.6
}

form {
    display: grid;
    gap: 1.1rem;
    max-width: 29rem;
    margin: 2rem 0
}

label {
    display: grid;
    gap: .5rem;
    font-size: .9rem
}

input,
textarea {
    font: inherit;
    background: #1a1d1a;
    border: 1px solid #50574e;
    border-radius: 6px;
    color: inherit;
    padding: .85rem;
    width: 100%
}

button,
.button {
    font: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    background: var(--accent);
    color: #17200f;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: .85rem 1.25rem;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
    width: fit-content
}

.button {
    margin: 1rem 0
}

.secondary {
    background: transparent;
    color: inherit;
    border-color: #60675c
}

button:disabled {
    opacity: .55;
    cursor: wait
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px
}

#status {
    max-width: 38rem;
    line-height: 1.65;
    overflow-wrap: anywhere
}

#status[data-error=true] {
    color: #ffb7aa
}

footer {
    border-top: 1px solid #30342f;
    color: var(--muted);
    font-size: .8rem;
    flex-wrap: wrap
}

ul {
    padding-left: 1.2rem;
    line-height: 1.8
}

[hidden] {
    display: none !important
}

@media(prefers-reduced-motion:no-preference) {

    a,
    button {
        transition: filter .15s
    }

    a:hover,
    button:hover {
        filter: brightness(1.15)
    }
}

select {
    font: inherit;
    background: #1a1d1a;
    color: inherit;
    border: 1px solid #50574e;
    border-radius: 6px;
    padding: .85rem
}

.check {
    display: flex;
    align-items: center;
    gap: .6rem
}

.check input {
    width: auto
}

.skip-link {
    position: absolute;
    top: -10rem;
    left: 1rem;
    z-index: 10;
    padding: 1rem;
    border-radius: .3rem;
    background: var(--accent);
    color: #17200f;
    font-weight: 700;
}

.skip-link:focus {
    top: 1rem;
}

/* Keep keyboard focus visible and allow narrow layouts to wrap. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

nav a {
    display: inline-block;
    padding: .5rem 0;
}

@media (max-width: 480px) {
    header {
        flex-wrap: wrap;
    }

    header>* {
        min-width: 0;
    }

    main {
        overflow-wrap: anywhere;
    }
}

/* Preserve readable controls and focus at narrow widths and in forced colors. */
body {
    min-height: 100vh;
    min-height: 100dvh;
}

label,
input,
textarea,
select {
    min-width: 0;
}

input,
textarea,
select,
.secondary {
    border-color: #7b8477;
}

input,
textarea,
select,
button,
.button {
    max-width: 100%;
}

button,
.button {
    min-height: 44px;
    white-space: normal;
    overflow-wrap: anywhere;
}

nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

#signin>a,
#reset>a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: .5rem 0;
}

.check {
    min-height: 44px;
    cursor: pointer;
}

.check input {
    min-width: 24px;
    min-height: 24px;
    margin: 0;
}

main {
    scroll-margin-top: 1rem;
}

@media (forced-colors: active) {

    button,
    .button {
        border-color: ButtonText;
        background: ButtonFace;
        color: ButtonText;
    }

    input,
    textarea,
    select {
        border-color: CanvasText;
    }

    :focus-visible {
        outline-color: Highlight;
    }

    .skip-link {
        border: 2px solid CanvasText;
        background: Canvas;
        color: CanvasText;
    }
}

/* Public contact details; account forms retain their existing styles. */
.contact-section {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid #30342f;
}

.contact-list {
    display: grid;
    gap: 1.5rem;
}

.contact-list div {
    min-width: 0;
}

.contact-list dt {
    color: var(--muted);
    font-size: .85rem;
}

.contact-list dd {
    margin: 0;
}

.contact-list a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* Readable long-form public privacy notice. */
.privacy-notice {
    max-width: 44rem;
}

.privacy-notice p {
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.privacy-notice a {
    text-decoration: underline;
}

/* Associate validation feedback with the affected profile controls. */
.field-error {
    color: #ffb7aa;
    line-height: 1.5;
    margin: 0;
}

[aria-invalid="true"] {
    border-color: #ffb7aa;
}

/* Keep profile grouping visually consistent while native disabled controls block edits during saving. */
#profile-fields {
    border: 0;
    padding: 0;
    margin: 0;
    min-width: 0;
    display: grid;
    gap: 1.1rem;
}

#profile-fields legend {
    padding: 0 0 1rem;
    font-weight: 650;
}

/* Account-only navigation and grouping; public homepages keep their layout. */
.account-jump {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 1.5rem 0;
}

.account-jump a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: .6rem .85rem;
    border: 1px solid #50574e;
    border-radius: 6px;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.profile-section {
    display: grid;
    gap: 1.1rem;
}

.profile-section h2,
.profile-section h3,
.profile-section p {
    margin: 0;
}

.profile-section+.profile-section {
    border-top: 1px solid #30342f;
    margin-top: 1rem;
    padding-top: 1.5rem;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.profile-section,
.account-panel {
    scroll-margin-top: 1rem;
}

.account-panel {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #30342f;
}

.account-panel h2 {
    margin-top: 0;
}

.website-access dl {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: .5rem 1rem;
}

.website-access dd {
    margin: 0;
    overflow-wrap: anywhere;
}

/* TormentLabs visual foundation; system fonts and local assets only. */
.wordmark {
    font-size: 1.35rem;
    font-weight: 750;
    letter-spacing: -.055em;
    line-height: 1.15;
    color: #f2f0e9;
    white-space: nowrap
}

.wordmark b {
    color: var(--accent);
    font-weight: inherit
}

.brand {
    letter-spacing: normal
}

button,
input,
select,
.button {
    min-height: 44px
}

p,
li,
dd {
    overflow-wrap: anywhere
}
