/* Styles shared by page boxes, buttons, forms, messages, popups, and date controls. */
.main-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(1.25rem, 2vw, 2rem);

    width: min(calc(100% - 2rem), var(--site-max-width));
    max-width: var(--site-max-width);
    margin: clamp(1.5rem, 4vw, 5rem) auto;
    padding: clamp(1.5rem, 3vw, 3rem) clamp(1.5rem, 8vw, 10rem);

    border: var(--border-strong);
    border-radius: 2rem;
    background: linear-gradient(
        to right in oklch,
        #6f6f6f 0%,
        #8a8a8a 14%,
        #b7b7b7 28%,
        #d8d8d8 42%,
        #efefef 50%,
        #d4d4d4 58%,
        #ababab 72%,
        #858585 86%,
        #6d6d6d 100%
    );
    background-size: 100% 100%;
    box-shadow:
        inset 0 0.0625rem 0 rgba(255, 255, 255, 0.45),
        inset 0 -0.0625rem 0 rgba(0, 0, 0, 0.18);
}

.main-container--account {
    max-width: 42rem;
}

.main-container--signup {
    max-width: 55rem;
    padding-inline: clamp(1.5rem, 5vw, 4rem);
}

.main-container--signup .form {
    width: min(100%, 36rem);
}

.main-container--profile {
    max-width: 55rem;
}

.main-container--confirmation {
    max-width: 55rem;
}

.main-container::after {
    content: "";
    position: absolute;
    inset: 0.5rem;
    border-radius: 1.5rem;
    background-image:
        radial-gradient(
            circle closest-side,
            #fbfbfb 0%,
            #ededed 18%,
            #d2d2d2 38%,
            #969696 58%,
            #707070 72%,
            rgba(112, 112, 112, 0.3) 82%,
            transparent 100%
        ),
        radial-gradient(
            circle closest-side,
            #fbfbfb 0%,
            #ededed 18%,
            #d2d2d2 38%,
            #969696 58%,
            #707070 72%,
            rgba(112, 112, 112, 0.3) 82%,
            transparent 100%
        ),
        radial-gradient(
            circle closest-side,
            #fbfbfb 0%,
            #ededed 18%,
            #d2d2d2 38%,
            #969696 58%,
            #707070 72%,
            rgba(112, 112, 112, 0.3) 82%,
            transparent 100%
        ),
        radial-gradient(
            circle closest-side,
            #fbfbfb 0%,
            #ededed 18%,
            #d2d2d2 38%,
            #969696 58%,
            #707070 72%,
            rgba(112, 112, 112, 0.3) 82%,
            transparent 100%
        );
    background-size:
        3rem 0.75rem,
        3rem 0.75rem,
        0.75rem 2.75rem,
        0.75rem 2.75rem;
    background-repeat:
        round no-repeat,
        round no-repeat,
        no-repeat round,
        no-repeat round;
    background-position:
        center top,
        center bottom,
        left center,
        right center;

    mix-blend-mode: multiply;
    opacity: 0.95;
    pointer-events: none;
}

/* Shared interactive controls */
.button,
.slideshow-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-surface);
    border: var(--border-strong);
    color: var(--color-ink);
    cursor: pointer;
    box-shadow: 0 0.2rem 0.45rem rgba(0, 0, 0, 0.14);
    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.button {
    height: auto;
    padding: 0.4em 1.15em;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
}

.button:hover,
.slideshow-button:hover {
    border-color: var(--color-ink);
    color: var(--color-contrast);
    background-color: var(--color-ink);
    transform: translateY(-1px);
}

.button:focus-visible,
.slideshow-button:focus-visible {
    outline: 3px solid var(--focus-outline);
    outline-offset: 2px;
}

.button:active,
.slideshow-button:active {
    transform: translateY(0);
    box-shadow: 0 0.1rem 0.25rem rgba(0, 0, 0, 0.16);
}

/* Authentication and profile forms */
.form-input {
    width: 100%;
    min-height: clamp(2.2rem, 3vw, 2.5rem);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
}

.form-fields {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: clamp(1.1rem, 2.2vw, 1.6rem);
}

.form-field {
    width: 100%;
    display: flex;
    flex-direction: column;
    min-width: 14rem;
    gap: clamp(0.25rem, 0.6vw, 0.5rem);
    font-size: clamp(1.35rem, 1rem + 1.5vw, 1.9rem);
    font-weight: 500;
}

.form-row .form-field {
    font-size: clamp(1.05rem, 0.95rem + 0.65vw, 1.35rem);
    flex: 1 1 0;
}

.form .button {
    font-size: clamp(1.15rem, 1rem + 1vw, 1.5rem);
    min-width: min(100%, 10rem);
    margin-bottom: clamp(0.1rem, 0.3vw, 0.2rem);
}

.form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: clamp(2rem, 4vw, 3rem);

    flex: 1;
}

.form > * {
    margin: 0;
}

.form-header {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: clamp(1rem, 2vw, 1.25rem);
}

.form-header > * {
    margin: 0;
}

.form h1 {
    font-size: clamp(2.5rem, 1.75rem + 3vw, 4rem);
    font-weight: 600;
    line-height: 1;
}

.form-message {
    margin: 0;
    max-width: clamp(16rem, 32vw, 24rem);
}

.form-message--error {
    color: #4b0d0d;
}

.form-message--success {
    color: #173e1e;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: clamp(1.1rem, 2vw, 1.5rem);
}

.form-misc {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: clamp(0.75rem, 1.5vw, 1.25rem);
    align-items: center;
}

.form-misc a {
    margin-left: auto;
    font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1rem);
    color: var(--color-ink);
    transition: color 0.2s ease;
}

.form-misc a:hover {
    color: var(--color-contrast);
}

.form-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(0.35rem, 0.8vw, 0.6rem);
}

/* Profile settings */
.profile-forms {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: clamp(2rem, 4vw, 3rem);
}

.profile-form {
    width: 100%;
}

.profile-summary-form {
    cursor: default;
}

.profile-settings-group {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 2vw, 1.5rem);
}

.profile-form-footer {
    width: 100%;
    align-items: flex-end;
}

.profile-form-footer .button {
    width: fit-content;
    max-width: 100%;
    white-space: nowrap;
}

.profile-display-field {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-height: clamp(2.2rem, 3vw, 2.5rem);
    padding: 0.45rem 0.75rem;
    border: var(--border-strong);
    border-radius: var(--radius-sm);
    background-color: rgba(255, 255, 255, 0.72);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.25;
    white-space: nowrap;
}

.profile-radio-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: clamp(0.75rem, 1.5vw, 1rem);
    align-items: center;
    width: 100%;
    min-height: clamp(2.2rem, 3vw, 2.5rem);
}

.profile-radio-option {
    display: flex;
    flex: 0 0 6.25rem;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.45rem 0.75rem;
    border: var(--border-strong);
    border-radius: var(--radius-sm);
    background-color: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 400;
    white-space: nowrap;
    transition:
        background-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.profile-radio-option:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.profile-radio-option:active {
    transform: translateY(1px);
}

.profile-radio-option:has(input[type="radio"]:checked) {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow:
        var(--edge-highlight),
        var(--edge-shadow);
}

.profile-radio-option:has(input[type="radio"]:focus-visible) {
    outline: 3px solid var(--focus-outline);
    outline-offset: 2px;
}

.profile-radio-option input[type="radio"] {
    width: 1rem;
    height: 1rem;
    margin: 0;
    appearance: none;
    border: 2px solid var(--color-ink);
    border-radius: 50%;
    background-color: transparent;
    cursor: pointer;
    display: inline-grid;
    place-content: center;
}

.profile-radio-option input[type="radio"]::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.15s ease;
    background-color: var(--color-ink);
}

.profile-radio-option input[type="radio"]:checked::before {
    transform: scale(1);
}

.profile-radio-option input[type="radio"]:focus-visible {
    outline: none;
}

.form-misc--signup p {
    font-size: clamp(0.78rem, 0.74rem + 0.2vw, 0.86rem);
    line-height: 1.4;
}

.form-misc--signup a {
    margin-left: 0;
    font-size: inherit;
}

/* Custom checkboxes styled consistently while keeping normal checkbox behavior */
.checkbox-field {
    display: flex;
    align-items: center;
    gap: clamp(0.25rem, 0.55vw, 0.35rem);
}

.checkbox {
    appearance: none;
    width: clamp(1rem, 1.4vw, 1.1rem);
    height: clamp(1rem, 1.4vw, 1.1rem);
    margin: 0;
    border: var(--border-thin);
    border-radius: clamp(0.15rem, 0.35vw, 0.2rem);
    background-color: var(--color-contrast);
    cursor: pointer;
    position: relative;
}

.checkbox:checked {
    background-color: var(--color-ink);
}

.checkbox:checked::after {
    content: "";
    position: absolute;
    left: 0.35rem;
    top: 0.2rem;
    width: 0.22rem;
    height: 0.5rem;
    border: solid var(--color-contrast);
    border-width: 0 0.15rem 0.15rem 0;
    transform: rotate(45deg);
}

/* Long-form informational page copy */
.copy {
    display: flex;
    flex-direction: column;
    gap: clamp(0.75rem, 1.5vw, 1rem);
    max-width: min(100%, 45rem);
    text-align: center;

    margin: 0;
}

.copy ul {
    text-align: left;
    padding-left: 1.25rem;
}

.copy li {
    font-size: clamp(1rem, 0.95rem + 0.4vw, 1.12rem);
    line-height: clamp(1.75rem, 2vw, 3rem);
}

.copy h1 {
    font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
    font-weight: 600;
}

.copy p {
    font-size: clamp(1rem, 0.95rem + 0.4vw, 1.12rem);
    line-height: clamp(1.75rem, 2vw, 3rem);
}

.copy a {
    color: var(--color-ink);
    transition: color 0.2s ease;
}

.copy a:hover {
    color: var(--color-contrast);
}

.copy > * {
    margin: 0;
}
