/* Hallmark · component: administrator profile modal · genre: archive utility · theme: incumbent Tony Chase Archive
 * states: default · hover · focus · active · disabled · loading · error · success
 * pre-emit critique: P5 H5 E5 S5 R5 V4 · contrast: pass
 */

html.profile-modal-open,
body.profile-modal-open {
    overflow: hidden;
}

#profile-modal.profile-dialog {
    position: fixed;
    inset: 0;
    z-index: var(--profile-z-modal);
    display: none;
    width: auto;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: clamp(0.75rem, 2vw, 1.5rem);
    overflow-y: auto;
    transform: none;
    border: 0;
    border-radius: 0;
    background: var(--profile-backdrop);
    color: var(--profile-ink);
    font-family: var(--profile-font);
    box-shadow: none;
}

body #profile-modal.profile-dialog {
    z-index: var(--profile-z-modal);
}

#profile-modal.profile-dialog.is-open {
    display: grid;
    place-items: center;
}

#profile-modal .profile-dialog__surface {
    position: relative;
    width: min(100%, 72rem);
    max-width: none;
    max-height: min(92dvh, 58rem);
    margin: 0;
    padding: clamp(1rem, 2.5vw, 1.75rem);
    overflow: auto;
    border: 1px solid var(--profile-rule-strong);
    border-radius: var(--profile-radius-panel);
    background: var(--profile-surface);
    color: var(--profile-ink);
    box-shadow: 0 1.25rem 3.5rem var(--profile-shadow);
    text-align: left;
    animation: profile-dialog-enter var(--profile-duration-long) var(--profile-ease-out) both;
}

@keyframes profile-dialog-enter {
    from {
        opacity: 0;
        transform: translateY(0.5rem) scale(0.985);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

#profile-modal .profile-dialog__close {
    position: sticky;
    z-index: 2;
    top: 0;
    float: right;
    min-height: 2.75rem;
    margin: 0;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--profile-rule-strong);
    border-radius: var(--profile-radius-control);
    background: var(--profile-surface);
    color: var(--profile-ink);
    cursor: pointer;
    font: 700 0.8125rem/1 var(--profile-font);
    transition: transform var(--profile-duration-micro) var(--profile-ease-out),
        background-color var(--profile-duration-short) var(--profile-ease-out),
        color var(--profile-duration-short) var(--profile-ease-out);
}

#profile-modal .profile-dialog__close:hover {
    background: var(--profile-accent-soft);
    color: var(--profile-accent-hover);
}

#profile-modal .profile-dialog__close:active {
    transform: translateY(1px);
}

#profile-modal button:focus-visible,
#profile-modal [role="tab"]:focus-visible,
#profile-confirm-dialog button:focus-visible,
#profile-confirm-dialog textarea:focus-visible,
#profile-confirm-dialog input:focus-visible {
    outline: 3px solid var(--profile-focus);
    outline-offset: 2px;
}

.profile-identity {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.6rem;
    justify-items: center;
    padding: 0.25rem 4.75rem 1rem;
    border-bottom: 1px solid var(--profile-rule);
    text-align: center;
}

#profile-modal .profile-identity #profile-avatar {
    width: 5.25rem;
    height: 5.25rem;
    margin: 0;
    border: 2px solid var(--profile-accent);
    border-radius: 50%;
    background: var(--profile-surface-muted);
    object-fit: cover;
}

.profile-identity__copy {
    min-width: 0;
}

#profile-modal .profile-identity .profile-username {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    color: var(--profile-ink);
    font: 800 1.5rem/1.15 var(--profile-font);
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
    text-align: center;
}

#profile-modal .profile-identity p {
    margin: 0.2rem 0 0;
    color: var(--profile-ink-muted);
    font-size: 0.875rem;
    line-height: 1.45;
    text-align: center;
}

.profile-identity__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    margin-top: 0.45rem;
    color: var(--profile-ink-muted);
    font-size: 0.75rem;
    justify-content: center;
}

.profile-identity__meta span:not(:empty)::before {
    content: "";
    display: inline-block;
    width: 0.35rem;
    height: 0.35rem;
    margin-right: 0.4rem;
    border-radius: 50%;
    background: var(--profile-rule-strong);
    vertical-align: 0.08em;
}

#profile-modal .profile-bio,
#profile-modal .profile-website {
    max-width: 70ch;
}

#profile-modal .profile-website a {
    color: var(--profile-accent-hover);
}

.profile-admin-workspace {
    margin-top: 1rem;
}

.profile-admin-workspace[hidden] {
    display: none;
}

.profile-admin-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.875rem;
}

.profile-admin-heading h3 {
    margin: 0;
    color: var(--profile-ink);
    font-size: 1rem;
    line-height: 1.2;
}

.profile-admin-heading p {
    max-width: 62ch;
    margin: 0.25rem 0 0;
    color: var(--profile-ink-muted);
    font-size: 0.8125rem;
}

.profile-state-chip,
.profile-evidence-chip {
    display: inline-flex;
    align-items: center;
    min-height: 1.75rem;
    padding: 0.25rem 0.55rem;
    border-radius: var(--profile-radius-control);
    background: var(--profile-accent-soft);
    color: var(--profile-accent-hover);
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
}

.profile-state-chip.is-banned,
.profile-evidence-chip.is-danger {
    background: var(--profile-danger-soft);
    color: var(--profile-danger);
}

.profile-evidence-chip.is-legacy {
    background: color-mix(in oklch, var(--profile-warning) 15%, var(--profile-surface));
    color: var(--profile-warning);
}

.profile-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.25rem;
    padding: 0.25rem;
    border: 1px solid var(--profile-rule);
    border-radius: var(--profile-radius-panel);
    background: var(--profile-surface-muted);
}

.profile-tab,
.profile-filter {
    min-height: 2.75rem;
    padding: 0.55rem 0.75rem;
    border: 0;
    border-radius: var(--profile-radius-control);
    background: transparent;
    color: var(--profile-ink-muted);
    cursor: pointer;
    font: 750 0.8125rem/1 var(--profile-font);
    white-space: nowrap;
    transition: transform var(--profile-duration-micro) var(--profile-ease-out),
        background-color var(--profile-duration-short) var(--profile-ease-out),
        color var(--profile-duration-short) var(--profile-ease-out);
}

.profile-tab:hover,
.profile-filter:hover {
    color: var(--profile-ink);
}

.profile-tab:active,
.profile-filter:active {
    transform: translateY(1px);
}

.profile-tab.is-active,
.profile-filter.is-active {
    background: var(--profile-surface);
    color: var(--profile-accent-hover);
    box-shadow: 0 1px 2px var(--profile-shadow);
}

.profile-panel {
    padding-top: 1rem;
}

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

.profile-panel__content {
    min-width: 0;
}

.profile-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.profile-summary-item {
    min-width: 0;
    padding: 0.875rem;
    border: 1px solid var(--profile-rule);
    border-radius: var(--profile-radius-panel);
    background: var(--profile-surface-muted);
}

.profile-summary-item dt {
    margin: 0;
    color: var(--profile-ink-muted);
    font-size: 0.75rem;
}

.profile-summary-item dd {
    margin: 0.3rem 0 0;
    color: var(--profile-ink);
    font-size: 1.125rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.profile-section-title {
    margin: 1.25rem 0 0.625rem;
    color: var(--profile-ink);
    font-size: 0.9375rem;
}

.profile-data-list {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.profile-data-row {
    display: grid;
    grid-template-columns: minmax(9rem, 0.8fr) minmax(0, 2fr) auto;
    gap: 0.75rem;
    align-items: start;
    padding: 0.75rem;
    border-bottom: 1px solid var(--profile-rule);
    color: var(--profile-ink);
}

.profile-data-row:last-child {
    border-bottom: 0;
}

.profile-data-row__primary {
    min-width: 0;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.profile-data-row__primary code,
.profile-ip {
    font-family: var(--profile-mono);
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
}

.profile-data-row__body {
    min-width: 0;
    color: var(--profile-ink-muted);
    font-size: 0.8125rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.profile-data-row__body blockquote {
    max-width: 70ch;
    margin: 0.35rem 0 0;
    color: var(--profile-ink);
    white-space: pre-wrap;
}

.profile-row-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
}

.profile-button {
    min-height: 2.75rem;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--profile-accent);
    border-radius: var(--profile-radius-control);
    background: var(--profile-accent);
    color: var(--profile-accent-ink);
    cursor: pointer;
    font: 800 0.8125rem/1.1 var(--profile-font);
    white-space: nowrap;
    transition: transform var(--profile-duration-micro) var(--profile-ease-out),
        background-color var(--profile-duration-short) var(--profile-ease-out),
        border-color var(--profile-duration-short) var(--profile-ease-out),
        color var(--profile-duration-short) var(--profile-ease-out),
        opacity var(--profile-duration-short) var(--profile-ease-out);
}

.profile-button:hover,
.profile-button.is-hover {
    border-color: var(--profile-accent-hover);
    background: var(--profile-accent-hover);
}

.profile-button:active,
.profile-button.is-active {
    transform: translateY(1px);
}

.profile-button:disabled,
.profile-button.is-disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.profile-button[data-state="loading"] {
    cursor: wait;
    opacity: 0.72;
}

.profile-button.is-focus {
    outline: 3px solid var(--profile-focus);
    outline-offset: 2px;
}

.profile-button.is-error {
    border-color: var(--profile-danger);
    background: var(--profile-danger-soft);
    color: var(--profile-danger);
}

.profile-button.is-success {
    border-color: var(--profile-success);
    background: color-mix(in oklch, var(--profile-success) 14%, var(--profile-surface));
    color: var(--profile-success);
}

.profile-button--secondary {
    border-color: var(--profile-rule-strong);
    background: var(--profile-surface);
    color: var(--profile-ink);
}

.profile-button--secondary:hover {
    border-color: var(--profile-accent);
    background: var(--profile-accent-soft);
    color: var(--profile-accent-hover);
}

.profile-button--danger {
    border-color: var(--profile-danger);
    background: var(--profile-danger);
    color: var(--profile-danger-ink);
}

.profile-button--danger:hover {
    border-color: var(--profile-danger-hover);
    background: var(--profile-danger-hover);
}

.profile-button--danger-outline {
    border-color: var(--profile-danger);
    background: transparent;
    color: var(--profile-danger);
}

.profile-button--danger-outline:hover {
    border-color: var(--profile-danger-hover);
    background: var(--profile-danger-soft);
    color: var(--profile-danger-hover);
}

.profile-button--small {
    min-height: 2rem;
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
}

.profile-activity-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--profile-rule);
}

.profile-moderation-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.profile-action-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    padding: 0.875rem;
    border: 1px solid var(--profile-rule);
    border-radius: var(--profile-radius-panel);
    background: var(--profile-surface-muted);
}

.profile-action-group h4 {
    margin: 0;
    color: var(--profile-ink);
    font-size: 0.875rem;
}

.profile-action-group p {
    flex: 1;
    margin: 0.35rem 0 0.875rem;
    color: var(--profile-ink-muted);
    font-size: 0.75rem;
    line-height: 1.45;
}

body.live-page #profile-modal .profile-moderation-grid .profile-button {
    width: auto;
    max-width: 100%;
    min-height: 2.25rem;
    padding: 0.4rem 0.65rem;
    font-size: 0.75rem;
    line-height: 1.2;
    white-space: normal;
}

@media (pointer: coarse) {
    body.live-page #profile-modal .profile-moderation-grid .profile-button {
        min-height: 3rem;
        padding: 0.55rem 0.75rem;
    }
}

.profile-moderation-status,
.profile-empty,
.profile-error {
    min-height: 1.35rem;
    margin: 0.75rem 0 0;
    color: var(--profile-ink-muted);
    font-size: 0.8125rem;
    line-height: 1.45;
}

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

.profile-moderation-status.is-error,
.profile-error {
    color: var(--profile-danger);
}

.profile-skeleton {
    display: grid;
    gap: 0.5rem;
}

.profile-skeleton span {
    display: block;
    height: 3.25rem;
    border-radius: var(--profile-radius-panel);
    background: var(--profile-surface-muted);
    opacity: 0.7;
    animation: profile-skeleton-pulse 1.4s var(--profile-ease-out) infinite alternate;
}

@keyframes profile-skeleton-pulse {
    to {
        opacity: 0.35;
    }
}

#profile-confirm-dialog.profile-confirm-dialog {
    width: min(calc(100% - 1.5rem), 34rem);
    max-width: 34rem;
    padding: 0;
    border: 0;
    border-radius: var(--profile-radius-panel);
    background: transparent;
    color: var(--profile-ink);
    font-family: var(--profile-font);
}

#profile-confirm-dialog::backdrop {
    background: var(--profile-backdrop);
}

.profile-confirm-dialog__surface {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 1.25rem;
    border: 1px solid var(--profile-rule-strong);
    border-radius: var(--profile-radius-panel);
    background: var(--profile-surface);
    box-shadow: 0 1.25rem 3.5rem var(--profile-shadow);
}

.profile-confirm-dialog h3 {
    margin: 0;
    color: var(--profile-ink);
    font-size: 1.125rem;
}

.profile-confirm-dialog p {
    margin: 0.35rem 0 0;
    color: var(--profile-ink-muted);
    font-size: 0.8125rem;
    line-height: 1.45;
}

.profile-confirm-dialog label {
    color: var(--profile-ink);
    font-size: 0.8125rem;
    font-weight: 750;
}

.profile-confirm-dialog textarea,
.profile-confirm-dialog input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.7rem;
    border: 1px solid var(--profile-rule-strong);
    border-radius: var(--profile-radius-control);
    background: var(--profile-surface-muted);
    color: var(--profile-ink);
    font: 0.875rem/1.45 var(--profile-font);
}

.profile-confirm-dialog footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.profile-confirm-impact {
    max-height: 12rem;
    overflow: auto;
    color: var(--profile-ink);
    font-size: 0.8125rem;
}

.profile-confirm-error {
    min-height: 1.25rem;
    color: var(--profile-danger) !important;
}

@media (max-width: 52rem) {
    .profile-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-moderation-grid {
        grid-template-columns: 1fr;
    }

    .profile-data-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .profile-row-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 36rem) {
    #profile-modal.profile-dialog {
        padding: 0;
    }

    #profile-modal.profile-dialog.is-open {
        place-items: start stretch;
    }

    #profile-modal .profile-dialog__surface {
        box-sizing: border-box;
        width: 100%;
        min-height: 100dvh;
        max-height: none;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .profile-identity {
        grid-template-columns: 1fr;
        justify-items: center;
        padding: 2.75rem 0 1rem;
        text-align: center;
    }

    #profile-modal .profile-identity #profile-avatar {
        grid-row: auto;
    }

    #profile-modal .profile-identity .profile-username,
    #profile-modal .profile-identity p {
        text-align: center;
    }

    .profile-identity__meta {
        justify-content: center;
    }

    #profile-modal .profile-bio,
    #profile-modal .profile-website {
        grid-column: 1;
    }

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

    .profile-admin-heading {
        flex-direction: column;
    }

    .profile-confirm-dialog footer {
        flex-direction: column-reverse;
    }

    .profile-confirm-dialog footer .profile-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    #profile-modal .profile-dialog__surface,
    .profile-skeleton span {
        animation: none;
    }

    #profile-modal *,
    #profile-confirm-dialog * {
        transition-duration: 0.01ms !important;
    }
}

/* Profile modal redesign · 2026-07
 * A larger archive-native profile sheet shared by the main archive and live channel.
 */
body:not(.live-page):not(.dark-mode) #profile-modal.profile-dialog {
    --profile-surface: #fefefe;
    --profile-surface-muted: #f4f4f4;
    --profile-surface-strong: #e9ecef;
    --profile-ink: #333;
    --profile-ink-muted: #666;
    --profile-rule: #ccc;
    --profile-rule-strong: #888;
    --profile-accent: #007bff;
    --profile-accent-hover: #0056b3;
    --profile-accent-soft: #eaf4ff;
    --profile-accent-ink: #fff;
}

#profile-modal.profile-dialog,
body.live-page #profile-modal.profile-dialog {
    padding: clamp(0.75rem, 2.2vw, 2rem);
    background: var(--profile-backdrop);
    font-family: var(--profile-font);
}

#profile-modal.profile-dialog.is-open,
body.live-page #profile-modal.profile-dialog.is-open {
    display: grid;
    place-items: center;
}

#profile-modal.profile-dialog .profile-dialog__surface,
body.live-page #profile-modal.profile-dialog .profile-dialog__surface {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: min(94vw, 64rem);
    height: auto;
    max-height: min(92dvh, 62rem);
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--profile-rule-strong);
    border-radius: var(--profile-radius-panel);
    background: var(--profile-surface);
    box-shadow: 0 8px 24px var(--profile-shadow);
    text-align: left;
}

#profile-modal.profile-dialog.has-admin-workspace .profile-dialog__surface,
body.live-page #profile-modal.profile-dialog.has-admin-workspace .profile-dialog__surface {
    grid-template-columns: minmax(17rem, 21rem) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    width: min(96vw, 90rem);
    height: min(92dvh, 62rem);
}

#profile-modal .profile-dialog__topbar,
body.live-page #profile-modal .profile-dialog__topbar {
    position: relative;
    z-index: 3;
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: space-between;
    min-height: 4.5rem;
    padding: 0.75rem clamp(1rem, 2vw, 1.5rem) 0.75rem clamp(1.25rem, 2.5vw, 2rem);
    border-bottom: 1px solid var(--profile-rule);
    background: var(--profile-surface);
}

.profile-dialog__context {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.profile-dialog__context > span:last-child {
    display: grid;
    gap: 0.1rem;
}

.profile-dialog__context strong {
    color: var(--profile-ink);
    font-size: 0.875rem;
    line-height: 1.1;
}

.profile-dialog__context small {
    color: var(--profile-ink-muted);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
}

#profile-modal .profile-dialog__close,
body.live-page #profile-modal .profile-dialog__close {
    position: static;
    display: inline-flex;
    float: none;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    min-height: 2.65rem;
    margin: 0;
    padding: 0.55rem 0.7rem 0.55rem 0.85rem;
    border: 1px solid var(--profile-accent) !important;
    border-radius: var(--profile-radius-control);
    background: var(--profile-accent) !important;
    color: var(--profile-accent-ink) !important;
    font-size: 0.8125rem;
}

#profile-modal .profile-dialog__close svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.6;
}

@media (hover: hover) and (pointer: fine) {
    #profile-modal .profile-dialog__close:hover,
    body.live-page #profile-modal .profile-dialog__close:hover {
        border-color: var(--profile-accent-hover) !important;
        background: var(--profile-accent-hover) !important;
        color: var(--profile-accent-ink) !important;
    }
}

#profile-modal .profile-identity,
body.live-page #profile-modal .profile-identity {
    display: grid;
    grid-template-columns: 9rem minmax(0, 1fr);
    gap: 1.5rem 2rem;
    align-items: center;
    justify-items: stretch;
    min-width: 0;
    padding: clamp(2rem, 5vw, 4rem);
    overflow-y: auto;
    border: 0;
    background: var(--profile-surface);
    text-align: left;
}

#profile-modal.has-admin-workspace .profile-identity,
body.live-page #profile-modal.has-admin-workspace .profile-identity {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    align-items: start;
    gap: 1.15rem;
    padding: clamp(1.5rem, 2.6vw, 2.25rem);
    border-right: 1px solid var(--profile-rule);
    background: var(--profile-surface-muted);
}

.profile-avatar-frame {
    position: relative;
    width: fit-content;
}

#profile-modal .profile-identity #profile-avatar,
body.live-page #profile-modal .profile-identity #profile-avatar {
    display: block;
    width: clamp(7.5rem, 11vw, 9rem);
    height: clamp(7.5rem, 11vw, 9rem);
    margin: 0;
    border: 3px solid var(--profile-accent);
    border-radius: 50%;
    background: var(--profile-surface-strong);
    box-shadow: none;
    object-fit: cover;
}

#profile-modal.has-admin-workspace .profile-identity #profile-avatar,
body.live-page #profile-modal.has-admin-workspace .profile-identity #profile-avatar {
    width: 7.5rem;
    height: 7.5rem;
}

.profile-avatar-status {
    display: none;
}

.profile-identity__copy {
    align-self: center;
}

#profile-modal .profile-identity__eyebrow,
#profile-modal .profile-identity__label,
body.live-page #profile-modal .profile-identity__eyebrow,
body.live-page #profile-modal .profile-identity__label {
    display: block;
    margin: 0 0 0.55rem;
    color: var(--profile-accent-hover);
    font: 700 0.6875rem/1 var(--profile-font);
    letter-spacing: 0.05em;
    text-align: left;
    text-transform: uppercase;
}

#profile-modal .profile-identity .profile-username,
body.live-page #profile-modal .profile-identity .profile-username {
    width: 100%;
    margin: 0;
    padding: 0;
    color: var(--profile-ink);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.035em;
    text-align: left;
    text-wrap: balance;
}

#profile-modal.has-admin-workspace .profile-identity .profile-username,
body.live-page #profile-modal.has-admin-workspace .profile-identity .profile-username {
    font-size: clamp(1.65rem, 2.8vw, 2.25rem);
}

#profile-modal .profile-identity .profile-full-name,
body.live-page #profile-modal .profile-identity .profile-full-name {
    margin: 0.65rem 0 0;
    color: var(--profile-ink-muted);
    font-size: 1rem;
    line-height: 1.4;
    text-align: left;
}

#profile-modal .profile-identity__meta,
body.live-page #profile-modal .profile-identity__meta {
    display: flex;
    justify-content: flex-start;
    gap: 0.4rem;
    margin-top: 1.15rem;
}

#profile-modal .profile-identity__meta span:not(:empty),
body.live-page #profile-modal .profile-identity__meta span:not(:empty) {
    display: inline-flex;
    align-items: center;
    min-height: 1.8rem;
    padding: 0.3rem 0.55rem;
    border: 1px solid var(--profile-rule);
    border-radius: var(--profile-radius-control);
    background: var(--profile-surface-muted);
    color: var(--profile-ink-muted);
    font-size: 0.75rem;
    line-height: 1.15;
}

#profile-modal .profile-identity__meta span:not(:empty)::before {
    display: none;
}

.profile-identity__details {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1.4fr) minmax(12rem, 0.6fr);
    gap: 1px;
    margin-top: 0.75rem;
    border: 1px solid var(--profile-rule);
    border-radius: var(--profile-radius-panel);
    background: var(--profile-rule);
    overflow: hidden;
}

#profile-modal.has-admin-workspace .profile-identity__details,
body.live-page #profile-modal.has-admin-workspace .profile-identity__details {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 0.35rem;
}

.profile-identity__section {
    min-width: 0;
    min-height: 6.5rem;
    padding: 1rem;
    background: var(--profile-surface);
}

#profile-modal.has-admin-workspace .profile-identity__section {
    min-height: 0;
}

#profile-modal .profile-identity .profile-bio,
#profile-modal .profile-identity .profile-website,
body.live-page #profile-modal .profile-identity .profile-bio,
body.live-page #profile-modal .profile-identity .profile-website {
    max-width: 62ch;
    margin: 0;
    color: var(--profile-ink);
    font-size: 0.88rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
    text-align: left;
    text-wrap: pretty;
}

#profile-modal .profile-identity .profile-website,
body.live-page #profile-modal .profile-identity .profile-website {
    color: var(--profile-ink-muted);
}

#profile-modal .profile-identity .profile-website:empty::after {
    content: "No website added";
}

#profile-modal .profile-identity .profile-website a,
body.live-page #profile-modal .profile-identity .profile-website a {
    color: var(--profile-accent-hover);
    font-weight: 700;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

#profile-modal .profile-admin-workspace,
body.live-page #profile-modal .profile-admin-workspace {
    min-width: 0;
    margin: 0;
    padding: clamp(1.5rem, 2.7vw, 2.5rem);
    overflow-y: auto;
    background: var(--profile-surface);
}

.profile-admin-heading {
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--profile-rule);
}

.profile-admin-heading__eyebrow {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--profile-danger);
    font: 700 0.6875rem/1 var(--profile-font);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.profile-admin-heading h3 {
    font-size: clamp(1.35rem, 2.2vw, 1.85rem);
    letter-spacing: -0.025em;
}

.profile-admin-heading p {
    margin-top: 0.4rem;
    font-size: 0.84rem;
    line-height: 1.5;
}

.profile-state-chip,
.profile-evidence-chip {
    border: 1px solid color-mix(in oklch, var(--profile-accent) 35%, var(--profile-rule));
    border-radius: 0.25rem;
}

.profile-tabs {
    gap: 0;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--profile-rule);
    border-radius: 0;
    background: transparent;
}

.profile-tab {
    position: relative;
    border-radius: 0;
}

.profile-tab::after {
    position: absolute;
    right: 0.75rem;
    bottom: -1px;
    left: 0.75rem;
    height: 2px;
    background: transparent;
    content: "";
}

.profile-tab.is-active {
    background: transparent;
    color: var(--profile-accent-hover);
    box-shadow: none;
}

.profile-tab.is-active::after {
    background: var(--profile-accent);
}

.profile-panel {
    padding-top: 1.5rem;
}

.profile-summary-grid {
    gap: 1px;
    border: 1px solid var(--profile-rule);
    border-radius: var(--profile-radius-panel);
    background: var(--profile-rule);
    overflow: hidden;
}

.profile-summary-item {
    padding: 1.15rem;
    border: 0;
    border-radius: 0;
    background: var(--profile-surface-muted);
}

.profile-summary-item dt {
    font: 700 0.75rem/1.2 var(--profile-font);
    letter-spacing: 0;
}

.profile-summary-item dd {
    margin-top: 0.65rem;
    font-size: 1.65rem;
    line-height: 1;
    letter-spacing: -0.03em;
}

.profile-section-title {
    margin-top: 1.65rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--profile-rule);
    font-size: 0.9rem;
}

.profile-data-list {
    gap: 0;
    border: 1px solid var(--profile-rule);
    border-radius: var(--profile-radius-panel);
    background: var(--profile-surface);
    overflow: hidden;
}

.profile-data-row {
    padding: 1rem;
}

.profile-data-row:hover {
    background: var(--profile-surface-muted);
}

.profile-activity-toolbar {
    gap: 0.4rem;
}

.profile-filter {
    min-height: 2.35rem;
    border: 1px solid transparent;
}

.profile-filter.is-active {
    border-color: var(--profile-rule-strong);
}

.profile-moderation-grid {
    gap: 1px;
    border: 1px solid var(--profile-rule);
    border-radius: var(--profile-radius-panel);
    background: var(--profile-rule);
    overflow: hidden;
}

.profile-action-group {
    padding: 1.2rem;
    border: 0;
    border-radius: 0;
    background: var(--profile-surface-muted);
}

body.live-page #profile-modal .profile-moderation-grid .profile-button {
    min-height: 2.75rem;
    padding: 0.6rem 0.8rem;
}

@media (max-width: 64rem) {
    #profile-modal.profile-dialog.has-admin-workspace .profile-dialog__surface,
    body.live-page #profile-modal.profile-dialog.has-admin-workspace .profile-dialog__surface {
        grid-template-columns: minmax(15rem, 17.5rem) minmax(0, 1fr);
    }

    #profile-modal.has-admin-workspace .profile-identity,
    body.live-page #profile-modal.has-admin-workspace .profile-identity {
        padding: 1.5rem;
    }

    .profile-identity__meta {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 48rem) {
    #profile-modal.profile-dialog,
    body.live-page #profile-modal.profile-dialog {
        padding: 0;
    }

    #profile-modal.profile-dialog .profile-dialog__surface,
    body.live-page #profile-modal.profile-dialog .profile-dialog__surface,
    #profile-modal.profile-dialog.has-admin-workspace .profile-dialog__surface,
    body.live-page #profile-modal.profile-dialog.has-admin-workspace .profile-dialog__surface {
        display: block;
        width: 100%;
        min-height: 100dvh;
        height: 100dvh;
        max-height: none;
        border: 0;
        border-radius: 0;
        overflow-y: auto;
    }

    #profile-modal .profile-dialog__topbar,
    body.live-page #profile-modal .profile-dialog__topbar {
        position: sticky;
        top: 0;
    }

    #profile-modal .profile-identity,
    body.live-page #profile-modal .profile-identity,
    #profile-modal.has-admin-workspace .profile-identity,
    body.live-page #profile-modal.has-admin-workspace .profile-identity {
        grid-template-columns: 6.5rem minmax(0, 1fr);
        gap: 1.25rem;
        padding: 1.75rem 1.25rem 2rem;
        overflow: visible;
        border-right: 0;
        border-bottom: 1px solid var(--profile-rule);
    }

    #profile-modal .profile-identity #profile-avatar,
    body.live-page #profile-modal .profile-identity #profile-avatar,
    #profile-modal.has-admin-workspace .profile-identity #profile-avatar,
    body.live-page #profile-modal.has-admin-workspace .profile-identity #profile-avatar {
        width: 6.5rem;
        height: 6.5rem;
    }

    #profile-modal .profile-identity .profile-username,
    body.live-page #profile-modal .profile-identity .profile-username,
    #profile-modal.has-admin-workspace .profile-identity .profile-username,
    body.live-page #profile-modal.has-admin-workspace .profile-identity .profile-username {
        font-size: clamp(1.6rem, 8vw, 2.35rem);
    }

    .profile-identity__details,
    #profile-modal.has-admin-workspace .profile-identity__details {
        grid-template-columns: minmax(0, 1fr);
    }

    #profile-modal .profile-admin-workspace,
    body.live-page #profile-modal .profile-admin-workspace {
        overflow: visible;
        padding: 1.5rem 1.25rem 3rem;
    }
}

@media (max-width: 34rem) {
    #profile-modal .profile-dialog__context small {
        display: none;
    }

    #profile-modal .profile-dialog__close span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    #profile-modal .profile-dialog__close,
    body.live-page #profile-modal .profile-dialog__close {
        width: 2.65rem;
        justify-content: center;
        padding: 0;
    }

    #profile-modal .profile-identity,
    body.live-page #profile-modal .profile-identity,
    #profile-modal.has-admin-workspace .profile-identity,
    body.live-page #profile-modal.has-admin-workspace .profile-identity {
        grid-template-columns: minmax(0, 1fr);
    }

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