.static-page {
    padding: clamp(48px, 6vw, 86px) 0;
}

.static-page__inner {
    max-width: 920px;
}

.static-page__header {
    margin-bottom: 28px;
}

.static-page__header span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.static-page__header h1 {
    margin: 8px 0 18px;
    max-width: 880px;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.08;
}

.static-content {
    display: grid;
    gap: 0;
    color: var(--text);
}

.static-content p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.78;
}

.static-content h2 {
    margin: 34px 0 14px;
    color: var(--text);
    font-size: 25px;
    line-height: 1.22;
}

.static-content h2:first-child {
    margin-top: 0;
}

.static-content b,
.static-content strong {
    color: var(--text);
}

.static-content a {
    color: var(--brand-2);
    font-weight: 800;
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--brand) 72%, transparent);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.static-content dl {
    display: grid;
    grid-template-columns: minmax(150px, 220px) 1fr;
    gap: 0;
    margin: 0 0 26px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.static-content dt,
.static-content dd {
    margin: 0;
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
}

.static-content dt {
    color: var(--muted);
    font-weight: 800;
}

.static-content dd {
    color: var(--text);
    font-weight: 700;
}

.static-content dt:last-of-type,
.static-content dd:last-of-type {
    border-bottom: 0;
}

.contact-page {
    max-width: 1120px;
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    gap: 24px;
    align-items: start;
}

.contact-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    padding: clamp(22px, 4vw, 34px);
}

.contact-panel p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.76;
}

.contact-panel p:last-child {
    margin-bottom: 0;
}

.contact-lead {
    color: var(--text) !important;
    font-size: clamp(24px, 3vw, 34px) !important;
    font-weight: 950;
    line-height: 1.18 !important;
}

.contact-steps {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin: 28px 0;
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
    padding: 22px;
}

.contact-steps h2,
.contact-details h2 {
    margin: 0 0 18px;
    color: var(--text);
    font-size: 22px;
    line-height: 1.2;
}

.contact-steps ol {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: contact-step;
}

.contact-steps li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    color: var(--text);
    font-weight: 850;
    counter-increment: contact-step;
}

.contact-steps li::before {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: var(--brand);
    color: #111111;
    content: counter(contact-step);
    font-size: 13px;
    font-weight: 950;
}

.contact-details {
    position: sticky;
    top: 104px;
}

.contact-details dl {
    display: grid;
    gap: 12px;
    margin: 0 0 22px;
}

.contact-details dl div {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
    padding: 14px;
}

.contact-details dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.contact-details dd {
    margin: 6px 0 0;
    color: var(--text);
    font-weight: 850;
}

.contact-details a:not(.solid-button) {
    color: var(--text);
}

.contact-copy-link {
    display: inline;
    border: 0;
    background: transparent;
    color: var(--text);
    padding: 0;
    font: inherit;
    font-weight: 850;
    text-align: left;
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--brand) 70%, transparent);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.contact-copy-link:hover {
    color: var(--brand);
}

.contact-details .solid-button,
.contact-copy-button {
    width: 100%;
}

.contact-copy-button {
    border: 0;
}

.contact-copy-status {
    min-height: 22px;
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.error-page {
    position: relative;
    display: grid;
    min-height: clamp(460px, 58vh, 640px);
    align-items: center;
    overflow: hidden;
    padding: clamp(58px, 8vw, 110px) 0;
}

@media (max-width: 860px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-details {
        position: static;
    }
}

.error-page__inner {
    position: relative;
    display: grid;
    justify-items: center;
    max-width: 760px;
    text-align: center;
}

.error-page__code {
    color: var(--brand);
    font-size: clamp(118px, 17vw, 190px);
    font-weight: 950;
    letter-spacing: 0;
    line-height: 0.82;
    text-shadow: 0 16px 34px rgba(252, 189, 1, 0.22);
}

.error-page__content {
    display: grid;
    justify-items: center;
    max-width: 620px;
}

.error-page__content h1 {
    margin: 22px 0 14px;
    color: var(--text);
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.08;
}

.error-page__content p {
    max-width: 560px;
    margin: 0 0 34px;
    color: var(--muted);
    font-size: 18px;
}

.error-page__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.error-page .solid-button {
    min-height: 48px;
    border-radius: 10px;
    background: var(--brand);
    color: #111111;
    box-shadow: 0 14px 28px rgba(252, 189, 1, 0.22);
}

.error-page .solid-button:hover {
    color: #111111;
    box-shadow: 0 18px 34px rgba(252, 189, 1, 0.3);
}

.preference-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.profile-page,
.settings-page {
    padding: clamp(58px, 8vw, 112px) 0;
}

.profile-page__inner,
.settings-page__inner {
    max-width: 1040px;
}

.profile-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    padding: clamp(22px, 4vw, 34px);
}

.profile-avatar {
    position: relative;
    display: inline-flex;
    width: clamp(72px, 9vw, 96px);
    height: clamp(72px, 9vw, 96px);
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--brand);
    color: #111111;
    font-size: clamp(30px, 5vw, 42px);
    font-weight: 950;
    overflow: hidden;
    box-shadow: 0 18px 34px rgba(252, 189, 1, 0.22);
}

.profile-avatar > span:not(.profile-avatar__edit) {
    color: #111111;
    font-size: clamp(34px, 5.4vw, 48px);
    font-weight: 950;
    line-height: 1;
    text-transform: none;
}

.profile-avatar--image .avatar-fallback {
    display: none;
}

.profile-avatar.is-avatar-missing .avatar-fallback {
    display: inline-flex;
}

.profile-avatar.is-avatar-missing img {
    display: none;
}

.profile-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-avatar--interactive {
    cursor: pointer;
    transition: transform 180ms var(--ease);
}

.profile-avatar--interactive:hover,
.profile-avatar--interactive:focus-visible {
    transform: translateY(-2px);
}

.profile-avatar__edit {
    position: absolute;
    inset: auto 0 0;
    z-index: 1;
    background: rgba(17, 17, 17, 0.72);
    color: #ffffff;
    padding: 5px 4px;
    font-size: 10px;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0;
    transition: opacity 180ms var(--ease);
}

.profile-avatar--interactive:hover .profile-avatar__edit,
.profile-avatar--interactive:focus-visible .profile-avatar__edit {
    opacity: 1;
}

.profile-flash {
    margin: 8px 0 0;
    font-size: 14px;
    font-weight: 800;
}

.profile-flash--success {
    color: var(--teal);
}

.profile-flash--error {
    color: var(--red);
}

.profile-page__inner > .profile-flash {
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    padding: 14px 16px;
}

.avatar-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.avatar-modal[hidden],
.avatar-modal[aria-hidden="true"],
.avatar-editor[hidden] {
    display: none !important;
}

.avatar-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 8, 8, 0.62);
    backdrop-filter: blur(6px);
}

.avatar-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(860px, 100%);
    max-height: min(92vh, 780px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: clamp(18px, 3vw, 26px);
    display: grid;
    gap: 16px;
}

.avatar-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.avatar-modal__header h2 {
    margin: 0;
    font-size: 20px;
}

.avatar-modal__close {
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text);
    font-size: 20px;
    line-height: 1;
}

.avatar-modal__hint {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.avatar-modal__body {
    display: grid;
    gap: 16px;
}

.avatar-modal__pick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    border-radius: 14px;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.avatar-modal:not(.is-avatar-ready) .avatar-modal__pick {
    width: 100%;
    min-height: 176px;
    border: 1px dashed color-mix(in srgb, var(--brand) 58%, var(--line));
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--brand) 12%, transparent), transparent 52%),
        var(--surface-2);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--surface) 62%, transparent);
}

.avatar-modal:not(.is-avatar-ready) .avatar-modal__pick:hover {
    border-color: var(--brand);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--brand) 18%, transparent), transparent 52%),
        var(--surface-2);
}

.avatar-modal.is-avatar-ready .avatar-modal__hint {
    display: none;
}

.avatar-modal__pick .solid-button {
    cursor: pointer;
}

.avatar-editor {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) 220px;
    gap: 18px;
    align-items: start;
}

.avatar-cropper__stage {
    --avatar-crop-inset: 10%;
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background:
        linear-gradient(45deg, color-mix(in srgb, var(--surface-2) 74%, var(--surface)) 25%, transparent 25%),
        linear-gradient(-45deg, color-mix(in srgb, var(--surface-2) 74%, var(--surface)) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, color-mix(in srgb, var(--surface-2) 74%, var(--surface)) 75%),
        linear-gradient(-45deg, transparent 75%, color-mix(in srgb, var(--surface-2) 74%, var(--surface)) 75%),
        var(--surface);
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
    background-size: 20px 20px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    touch-action: none;
    overscroll-behavior: contain;
    user-select: none;
    -webkit-user-select: none;
    cursor: grab;
}

.avatar-cropper__stage:active {
    cursor: grabbing;
}

.avatar-cropper__stage img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: auto;
    height: auto;
    max-width: none;
    pointer-events: none;
    will-change: transform;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

.avatar-cropper__overlay {
    position: absolute;
    inset: var(--avatar-crop-inset);
    z-index: 2;
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.34);
}

.avatar-cropper__frame {
    position: absolute;
    inset: var(--avatar-crop-inset);
    z-index: 3;
    border: 2px solid rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 0 1px rgba(17, 17, 17, 0.22), 0 16px 48px rgba(0, 0, 0, 0.22);
}

.avatar-cropper__grid {
    position: absolute;
    inset: var(--avatar-crop-inset);
    z-index: 4;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.36;
    background:
        linear-gradient(to right, transparent 32.8%, rgba(255, 255, 255, 0.92) 33%, rgba(255, 255, 255, 0.92) 33.4%, transparent 33.6%, transparent 66.2%, rgba(255, 255, 255, 0.92) 66.5%, rgba(255, 255, 255, 0.92) 66.9%, transparent 67.1%),
        linear-gradient(to bottom, transparent 32.8%, rgba(255, 255, 255, 0.92) 33%, rgba(255, 255, 255, 0.92) 33.4%, transparent 33.6%, transparent 66.2%, rgba(255, 255, 255, 0.92) 66.5%, rgba(255, 255, 255, 0.92) 66.9%, transparent 67.1%);
}

.avatar-cropper__panel {
    display: grid;
    gap: 14px;
}

.avatar-cropper__preview {
    display: grid;
    justify-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
    padding: 14px;
}

.avatar-cropper__preview span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.avatar-cropper__preview canvas {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.avatar-cropper__tools {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.avatar-cropper__tools button {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    font-weight: 850;
}

.avatar-cropper__tools button:hover {
    border-color: var(--brand);
    background: var(--brand);
    color: #111111;
}

.avatar-cropper__controls label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
}

.avatar-cropper__controls input[type="range"] {
    width: 100%;
    accent-color: var(--brand);
}

.avatar-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.avatar-modal:not(.is-avatar-ready) .avatar-modal__footer {
    display: none;
}

.profile-page__inner {
    display: grid;
    gap: 22px;
    max-width: 980px;
}

.profile-summary,
.profile-tabs,
.profile-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.profile-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    padding: clamp(22px, 4vw, 32px);
}

.profile-summary .profile-avatar {
    width: 82px;
    height: 82px;
    flex: 0 0 82px;
    overflow: visible;
    box-shadow: 0 14px 28px color-mix(in srgb, var(--brand) 24%, transparent);
}

.profile-summary .profile-avatar > span:not(.profile-avatar__edit) {
    font-size: 38px;
}

.profile-summary .profile-avatar__edit {
    inset: auto -3px -3px auto;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 2px solid var(--surface);
    border-radius: 50%;
    background: var(--brand);
    color: #111111;
    box-shadow: var(--shadow-soft);
    font-size: 0;
    opacity: 1;
    padding: 0;
}

.profile-summary .profile-avatar__edit::before {
    content: none;
}

.profile-summary .profile-avatar__edit svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

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

.profile-title-row h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(24px, 4vw, 34px);
    line-height: 1.1;
}

.profile-role-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border: 1px solid var(--brand);
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand) 12%, transparent);
    color: var(--text);
    padding: 0 14px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.profile-summary__main p,
.profile-summary__main small {
    display: block;
    margin: 8px 0 0;
    color: var(--muted);
}

.profile-summary__main small {
    font-size: 13px;
    font-weight: 750;
}

.profile-admin-link {
    align-self: start;
}

.profile-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    overflow: hidden;
}

.profile-tab {
    min-height: 50px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: var(--muted);
    font-size: 14px;
    font-weight: 850;
    cursor: pointer;
    transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.profile-tab:hover,
.profile-tab.is-active {
    color: var(--text);
    background: color-mix(in srgb, var(--brand) 7%, transparent);
}

.profile-tab.is-active {
    border-bottom-color: var(--brand);
}

.profile-panel[hidden] {
    display: none !important;
}

.profile-panel--stack {
    display: grid;
    gap: 22px;
}

.profile-card {
    display: grid;
    gap: 22px;
    padding: clamp(22px, 4vw, 32px);
}

.profile-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 14px;
}

.profile-card__header h2 {
    margin: 0;
    color: var(--text);
    font-size: 20px;
}

.profile-card__header p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.profile-card__header > div {
    min-width: 0;
}

.profile-add-button {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: var(--brand);
    color: #111;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: transform var(--transition), filter var(--transition), box-shadow var(--transition);
}

.profile-add-button:hover,
.profile-add-button:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.03);
    outline: 0;
}

.profile-add-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.6;
    stroke-linecap: round;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
}

.profile-form-grid .wide {
    grid-column: 1 / -1;
}

.profile-form-grid label,
.profile-security-form label,
.profile-author-form label {
    display: grid;
    gap: 8px;
}

.profile-form-grid span,
.profile-security-form span,
.profile-author-form span {
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
}

.profile-form-grid small,
.profile-security-form small,
.profile-author-form small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.profile-form-grid input,
.profile-security-form input,
.profile-author-form input,
.profile-author-form select,
.profile-author-form textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    padding: 0 14px;
    font: inherit;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.profile-form-grid input:focus,
.profile-security-form input:focus,
.profile-author-form input:focus,
.profile-author-form select:focus,
.profile-author-form textarea:focus {
    outline: 0;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}

.profile-author-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
}

.profile-author-form .wide {
    grid-column: 1 / -1;
}

.profile-author-form textarea {
    min-height: 120px;
    resize: vertical;
    padding-top: 12px;
}

.author-submit-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 24px;
}

.author-submit-modal[hidden],
.author-submit-modal[aria-hidden="true"] {
    display: none !important;
}

.author-submit-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(7px);
}

.author-submit-modal__dialog {
    position: relative;
    width: min(820px, 100%);
    max-height: min(820px, calc(100vh - 48px));
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
    padding: clamp(20px, 4vw, 30px);
}

.author-submit-modal__header {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 16px;
}

.author-submit-modal__header h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(24px, 4vw, 34px);
}

.author-submit-modal__header p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.author-submit-modal__close {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.profile-cover-source {
    display: grid;
    gap: 10px;
}

.profile-cover-source > span {
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
}

.profile-cover-source > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.profile-cover-source label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    padding: 0 14px;
    color: var(--text);
    font-weight: 850;
}

.profile-cover-source input[type="radio"] {
    align-self: center;
    box-sizing: border-box;
    flex: 0 0 22px;
    inline-size: 22px;
    block-size: 22px;
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    max-width: 22px;
    max-height: 22px;
    line-height: 1;
}

.profile-page input[type="checkbox"],
.profile-page input[type="radio"] {
    position: relative;
    display: inline-grid;
    width: 21px;
    height: 21px;
    min-width: 21px;
    flex: 0 0 21px;
    place-items: center;
    appearance: none;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    cursor: pointer;
    padding: 0;
    transition: border-color 160ms var(--ease), background 160ms var(--ease), box-shadow 160ms var(--ease);
}

.profile-page input[type="radio"] {
    border-radius: 50%;
}

.profile-page input[type="checkbox"]::after {
    width: 10px;
    height: 6px;
    border-bottom: 2px solid #111111;
    border-left: 2px solid #111111;
    content: "";
    opacity: 0;
    transform: translateY(-1px) rotate(-45deg) scale(0.72);
    transition: opacity 140ms var(--ease), transform 140ms var(--ease);
}

.profile-page input[type="radio"]::after {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #111111;
    content: "";
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 140ms var(--ease), transform 140ms var(--ease);
}

.profile-page input[type="checkbox"]:checked,
.profile-page input[type="radio"]:checked {
    border-color: var(--brand);
    background: var(--brand);
    box-shadow: 0 10px 24px rgba(252, 189, 1, 0.18);
}

.profile-page input[type="checkbox"]:checked::after {
    opacity: 1;
    transform: translateY(-1px) rotate(-45deg) scale(1);
}

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

.profile-cover-source small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.profile-file-picker {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-2);
    padding: 7px;
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.profile-file-picker:hover,
.profile-file-picker:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent);
}

.profile-file-picker__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 40px;
    border-radius: 8px;
    background: var(--brand);
    color: #111111;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 950;
}

.profile-file-picker__name {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-author-table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.profile-author-table {
    width: 100%;
    border-collapse: collapse;
}

.profile-author-table th,
.profile-author-table td {
    border-bottom: 1px solid var(--line);
    padding: 14px;
    text-align: left;
    vertical-align: top;
}

.profile-author-table tr:last-child td {
    border-bottom: 0;
}

.profile-author-table th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.profile-author-table td strong,
.profile-author-table td a {
    display: block;
}

.profile-author-table td a {
    margin-top: 6px;
    color: var(--brand);
    font-weight: 900;
}

.profile-inline-form {
    display: inline-flex;
    margin: 0;
}

.profile-table-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.profile-muted {
    display: inline-block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
}

.text-button--danger {
    color: #ef4444;
}

.profile-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand) 15%, var(--surface));
    color: var(--text);
    padding: 0 10px;
    font-size: 12px;
    font-weight: 900;
}

.profile-status--published {
    background: rgba(34, 197, 94, 0.16);
}

.profile-status--approved {
    background: rgba(34, 197, 94, 0.16);
}

.profile-status--needs_changes {
    background: color-mix(in srgb, var(--brand) 18%, var(--surface));
}

.profile-status--rejected,
.profile-status--archived {
    background: rgba(239, 68, 68, 0.14);
}

.profile-empty {
    margin: 0;
    border: 1px dashed var(--line);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--muted);
    padding: 18px;
}

.profile-card__actions {
    display: flex;
    justify-content: center;
}

.profile-card__actions .solid-button {
    min-width: min(280px, 100%);
}

.profile-security-form {
    display: grid;
    gap: 18px;
    max-width: 780px;
    margin: 0 auto;
    width: 100%;
}

.profile-two-factor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-2);
    padding: 16px;
}

.profile-two-factor strong {
    display: block;
    color: var(--text);
    font-size: 16px;
}

.profile-two-factor p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.profile-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 900;
}

.profile-switch input {
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
}

.profile-security-list {
    display: grid;
    gap: 10px;
    margin: 0;
    border-radius: 8px;
    background: var(--surface-2);
    padding: 18px;
}

.profile-security-list div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.profile-security-list dt {
    color: var(--text);
    font-weight: 900;
}

.profile-security-list dd {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}

.profile-hero span,
.profile-grid span,
.settings-header span,
.settings-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.profile-hero h1,
.settings-header h1 {
    margin: 4px 0 6px;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.06;
}

.profile-hero p,
.settings-header p {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

.profile-actions,
.settings-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.profile-grid,
.settings-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.profile-grid article,
.settings-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    padding: 18px;
}

.profile-grid strong {
    display: block;
    margin-top: 8px;
    overflow: hidden;
    color: var(--text);
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-header {
    max-width: 720px;
    margin-bottom: 22px;
}

.settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-card {
    display: grid;
    gap: 18px;
}

.settings-card--account {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.settings-card h2 {
    margin: 4px 0 0;
    font-size: 24px;
}

.settings-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.settings-options--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-options a {
    display: grid;
    gap: 4px;
    min-height: 86px;
    align-content: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
    padding: 14px;
}

.settings-options a.is-active {
    border-color: var(--brand);
    background: color-mix(in srgb, var(--brand) 18%, var(--surface));
}

.settings-options strong {
    color: var(--text);
}

.settings-options small {
    color: var(--muted);
    font-weight: 800;
}

body .profile-avatar > span:not(.profile-avatar__edit) {
    color: #111111;
    font-size: clamp(34px, 5.4vw, 48px);
    font-weight: 950;
    line-height: 1;
    text-transform: none;
}

@media (max-width: 820px) {
    .avatar-editor {
        grid-template-columns: 1fr;
    }

    .avatar-cropper__panel {
        grid-template-columns: minmax(112px, auto) minmax(0, 1fr);
        align-items: start;
    }

    .avatar-cropper__tools {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .error-page {
        min-height: 460px;
    }

    .error-page__code {
        font-size: clamp(92px, 30vw, 138px);
    }

    .static-content dl {
        grid-template-columns: 1fr;
    }

    .static-content dt {
        border-bottom: 0;
        padding-bottom: 3px;
    }

    .static-content dd {
        padding-top: 0;
    }

    .profile-hero,
    .settings-card--account {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .profile-summary {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .profile-title-row {
        justify-content: center;
    }

    .profile-admin-link {
        align-self: auto;
    }

    .profile-tabs,
    .profile-form-grid,
    .profile-author-form {
        grid-template-columns: 1fr;
    }

    .profile-card__header,
    .author-submit-modal__header {
        align-items: stretch;
    }

    .profile-cover-source > div {
        grid-template-columns: 1fr;
    }

    .author-submit-modal {
        align-items: stretch;
        padding: 8px;
    }

    .author-submit-modal__dialog {
        max-height: calc(100vh - 16px);
        border-radius: 14px;
    }

    .profile-two-factor {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .profile-actions,
    .settings-actions {
        justify-content: center;
    }

    .profile-grid,
    .settings-grid,
    .settings-options,
    .settings-options--two {
        grid-template-columns: 1fr;
    }

    .avatar-modal {
        align-items: stretch;
        padding: 8px;
    }

    .avatar-modal__dialog {
        max-height: calc(100vh - 16px);
        border-radius: 14px;
    }

    .avatar-cropper__panel {
        grid-template-columns: 1fr;
    }

    .avatar-cropper__tools {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
