:root {
    --primary: #4ABCD1;
    --secondary: #8E6C88;

    --background: #0F1115;
    --surface: #171A21;
    --surface-raised: #1D212A;

    --border: #2B303A;

    --text: #F4F4F5;
    --text-muted: #A9AFB8;

    --content-width: 1180px;
}


* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;

    font-family:
        "Figtree",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--background);
    color: var(--text);

    line-height: 1.6;
}


a {
    color: inherit;
    text-decoration: none;
}


/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;

    background: rgba(15, 17, 21, 0.9);
    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(12px);
}


.nav-container {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 16px 24px;

    display: flex;
    align-items: center;
    gap: 28px;
}


.brand {
    margin-right: auto;

    color: var(--primary);

    font-size: 1.4rem;
    font-weight: 800;
}


.nav-links {
    display: flex;
    gap: 24px;

    color: var(--text-muted);
}


.nav-links a:hover {
    color: var(--text);
}


.nav-actions {
    display: flex;
    gap: 10px;
}


/* Buttons */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 12px 20px;

    border-radius: 10px;

    background: var(--primary);
    color: #081014;

    font-weight: 700;

    transition:
        transform 0.15s ease,
        opacity 0.15s ease;
}


.button:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}


.button-secondary {
    background: var(--surface-raised);
    color: var(--text);

    border: 1px solid var(--border);
}


.button-small {
    padding: 9px 15px;
    font-size: 0.9rem;
}


/* Hero */

.hero-copy {
    max-width: 820px;
}

.hero {
    max-width: var(--content-width);
    margin: 0 auto;

    padding: 80px 24px 50px;

    display: block;
}


.eyebrow {
    margin-bottom: 12px;

    color: var(--primary);

    font-size: 0.82rem;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.09em;
}


.hero h1 {
    margin: 0 0 22px;

    max-width: 720px;

    font-size: clamp(3rem, 6vw, 5.2rem);
    line-height: 1;
}


.hero-description {
    max-width: 620px;

    color: var(--text-muted);

    font-size: 1.12rem;
}


.hero-actions {
    display: flex;
    flex-wrap: wrap;

    gap: 14px;

    margin-top: 28px;
}



/* Sections */

.section {
    max-width: var(--content-width);
    margin: 0 auto;

    padding: 80px 24px;
}


.section-heading {
    max-width: 720px;
    margin-bottom: 36px;
}


.section-heading h2,
.privacy-section h2 {
    margin: 0 0 16px;

    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.1;
}


.section-heading p,
.privacy-section p {
    color: var(--text-muted);
}


/* Product preview */

.system-preview-section {
    padding-top: 45px;
}


.system-window {
    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 20px;

    background: var(--surface);
}


.system-toolbar {
    padding: 16px 20px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    border-bottom: 1px solid var(--border);

    background: var(--surface-raised);
}


.system-label {
    color: var(--text-muted);

    font-size: 0.9rem;
}


.system-content {
    padding: 36px;
}


.system-header {
    display: flex;
    align-items: center;

    gap: 18px;
}


.system-avatar {
    width: 68px;
    height: 68px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            rgba(74, 188, 209, 0.25),
            rgba(142, 108, 136, 0.30)
        );

    color: var(--text);

    font-weight: 800;
}


.system-header h3 {
    margin: 0;

    font-size: 1.7rem;
}


.system-id {
    margin: 4px 0 0;

    color: var(--text-muted);
}


.system-description {
    max-width: 760px;

    margin: 28px 0;

    color: var(--text-muted);
}


.system-meta {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 14px;

    margin-bottom: 34px;
}


.system-meta > div {
    padding: 16px;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: var(--surface-raised);
}


.meta-label {
    display: block;

    margin-bottom: 4px;

    color: var(--text-muted);

    font-size: 0.85rem;
}


.system-section h4 {
    margin-bottom: 14px;
}


.member-list {
    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 12px;
}


.member-row {
    padding: 14px 16px;

    display: flex;
    justify-content: space-between;

    border-bottom: 1px solid var(--border);
}


.member-row:last-child {
    border-bottom: none;
}


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


/* Web flow */

.flow-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 24px;
}


.flow-step {
    padding: 4px;
}


.step-number {
    width: 34px;
    height: 34px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 14px;

    border-radius: 50%;

    background: var(--surface-raised);
    border: 1px solid var(--border);

    color: var(--primary);

    font-weight: 700;
}


.flow-step h3 {
    margin: 0 0 8px;
}


.flow-step p {
    margin: 0;

    color: var(--text-muted);
}


/* Dashboard */

.dashboard-section {
    padding-top: 65px;
}


.preview-window {
    min-height: 400px;

    display: grid;
    grid-template-columns: 220px 1fr;

    overflow: hidden;

    border-radius: 20px;
    border: 1px solid var(--border);

    background: var(--surface);
}


.preview-sidebar {
    padding: 28px;

    display: flex;
    flex-direction: column;

    gap: 16px;

    background: var(--surface-raised);
    border-right: 1px solid var(--border);

    color: var(--text-muted);
}


.preview-sidebar strong {
    margin-bottom: 12px;

    color: var(--primary);
}


.preview-sidebar .active-item {
    color: var(--text);
}


.preview-content {
    padding: 40px;
}


.preview-label {
    color: var(--secondary);

    font-weight: 700;
}


.dashboard-card {
    margin-top: 16px;
    padding: 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: var(--surface-raised);
}


.dashboard-card p {
    margin: 4px 0 0;

    color: var(--text-muted);
}


/* Origami overview */

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

.overview-card {
    min-height: 170px;
    padding: 22px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: var(--surface);

    transition:
        transform 0.15s ease,
        border-color 0.15s ease,
        background 0.15s ease;
}

.overview-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    background: var(--surface-raised);
}

.overview-card h3 {
    margin: 0 0 10px;
    font-size: 1.12rem;
}

.overview-card p {
    margin: 0;
    color: var(--text-muted);
}

/* Documentation */

.docs-entry-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.docs-entry-card {
    padding: 24px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: var(--surface);

    transition:
        transform 0.15s ease,
        border-color 0.15s ease,
        background 0.15s ease;
}

.docs-entry-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    background: var(--surface-raised);
}

.docs-entry-kicker {
    display: block;
    margin-bottom: 10px;

    color: var(--secondary);

    font-size: 0.8rem;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.docs-entry-card h3 {
    margin: 0 0 10px;
    font-size: 1.18rem;
}

.docs-entry-card p {
    margin: 0;
    color: var(--text-muted);
}

.docs-entry-actions {
    margin-top: 20px;
}

/* Privacy */

.privacy-section {
    display: grid;
    grid-template-columns: 1fr auto;

    gap: 60px;

    align-items: center;
}


.privacy-section > div:first-child {
    max-width: 700px;
}


.privacy-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;

    align-items: flex-start;
}


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


/* Footer */

.site-footer {
    max-width: var(--content-width);

    margin: 0 auto;
    padding: 46px 24px;

    display: flex;
    justify-content: space-between;
    gap: 32px;

    border-top: 1px solid var(--border);

    color: var(--text-muted);
}


.site-footer strong {
    color: var(--text);
}


.site-footer p {
    margin-bottom: 0;
}


.footer-links {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;

    gap: 22px;
}


.footer-links a:hover {
    color: var(--text);
}

/* Mobile additions */

@media (max-width: 850px) {

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

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

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

    .preview-window {
        grid-template-columns: 1fr;
    }

    .preview-sidebar {
        display: none;
    }

    .privacy-section {
        grid-template-columns: 1fr;
    }

    .site-footer {
        flex-direction: column;
    }
}


@media (max-width: 550px) {

    .system-meta {
        grid-template-columns: 1fr;
    }

    .system-toolbar {
        align-items: flex-start;
        gap: 14px;

        flex-direction: column;
    }

    .dashboard-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .overview-grid,
    .docs-entry-grid {
        grid-template-columns: 1fr;
    }
}


/* Docs pages */

.docs-shell {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 56px 24px 90px;

    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 54px;
}

.docs-sidebar {
    min-width: 0;
}

.docs-sidebar-inner {
    position: sticky;
    top: 96px;
}

.docs-sidebar strong {
    display: block;
    margin-bottom: 16px;

    color: var(--text);
    font-size: 0.95rem;
}

.docs-toc {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.docs-toc a {
    padding: 5px 0;

    color: var(--text-muted);

    font-size: 0.92rem;
}

.docs-toc a:hover {
    color: var(--primary);
}

.docs-content {
    min-width: 0;
    max-width: 820px;
}

.docs-section {
    scroll-margin-top: 105px;
    padding: 0 0 64px;
}

.docs-section + .docs-section {
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.docs-section h1 {
    margin: 0 0 20px;

    font-size: clamp(2.8rem, 6vw, 4.8rem);
    line-height: 1;
}

.docs-section h2 {
    margin: 34px 0 16px;

    font-size: clamp(2rem, 4vw, 2.7rem);
    line-height: 1.1;
}

.docs-section:first-child h2 {
    margin-top: 0;
}

.docs-section h3 {
    margin: 30px 0 10px;

    font-size: 1.25rem;
}

.docs-section p,
.docs-section li {
    color: var(--text-muted);
}

.docs-section p {
    margin: 0 0 16px;
}

.docs-section ul,
.docs-section ol {
    margin: 0 0 18px;
    padding-left: 22px;
}

.docs-section li + li {
    margin-top: 8px;
}

.docs-section code {
    padding: 3px 7px;

    border: 1px solid var(--border);
    border-radius: 6px;

    background: var(--surface-raised);
    color: var(--text);

    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92em;
}

.command-list {
    display: grid;
    gap: 8px;

    margin: 14px 0 20px;
}

.command-list code {
    display: block;
    width: fit-content;
    max-width: 100%;
}

.docs-steps {
    display: grid;
    gap: 12px;
}

.docs-steps li {
    padding-left: 4px;
}

.docs-callout {
    margin: 20px 0;
    padding: 17px 18px;

    border-left: 3px solid var(--primary);
    border-radius: 10px;

    background: var(--surface);
    color: var(--text-muted);
}

.docs-callout.warning {
    border-left-color: var(--secondary);
}

.docs-reference-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;

    margin-top: 18px;
}

.docs-reference-grid a {
    padding: 12px 14px;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: var(--surface);
    color: var(--text);
}

.docs-reference-grid a:hover {
    border-color: var(--primary);
}

@media (max-width: 900px) {
    .docs-shell {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .docs-sidebar-inner {
        position: static;
    }

    .docs-toc {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));

        padding: 16px;

        border: 1px solid var(--border);
        border-radius: 12px;

        background: var(--surface);
    }

    .docs-content {
        max-width: none;
    }
}

@media (max-width: 560px) {
    .docs-toc,
    .docs-reference-grid {
        grid-template-columns: 1fr;
    }
}


/* Origami app shell */

.app-shell {
    min-height: calc(100vh - 69px);

    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);

    background: var(--background);
}

.app-sidebar {
    position: sticky;
    top: 69px;

    height: calc(100vh - 69px);
    padding: 22px 18px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    border-right: 1px solid var(--border);

    background: var(--surface);
}

.app-sidebar-top {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.app-account {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-account-avatar,
.entity-avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            rgba(74, 188, 209, 0.25),
            rgba(142, 108, 136, 0.30)
        );

    font-weight: 800;
}

.app-account-avatar {
    width: 42px;
    height: 42px;
}

.entity-avatar {
    width: 40px;
    height: 40px;
}

.app-account strong,
.app-account span,
.entity-identity strong,
.entity-identity span {
    display: block;
}

.app-account span,
.entity-identity span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.app-system-picker {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-system-picker label {
    color: var(--text-muted);

    font-size: 0.8rem;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.app-system-picker select,
.field input,
.field textarea,
.privacy-row select {
    width: 100%;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: var(--surface-raised);
    color: var(--text);

    font: inherit;
}

.app-system-picker select,
.field input,
.privacy-row select {
    padding: 10px 12px;
}

.field textarea {
    padding: 12px;
    resize: vertical;
}

.app-nav,
.app-sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.app-nav a,
.app-sidebar-bottom a {
    padding: 9px 11px;

    border-radius: 9px;

    color: var(--text-muted);
}

.app-nav a:hover,
.app-sidebar-bottom a:hover,
.app-nav a.active {
    background: var(--surface-raised);
    color: var(--text);
}

.app-nav a.active {
    border-left: 3px solid var(--primary);
}

.app-main {
    width: 100%;
    max-width: 1180px;

    padding: 48px 42px 90px;
}

.app-page-toolbar {
    margin-bottom: 24px;

    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 28px;
}

.app-page-toolbar h1 {
    margin: 0 0 12px;

    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1;
}

.app-page-description {
    max-width: 720px;
    margin: 0;

    color: var(--text-muted);
}

.app-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.access-state {
    margin-bottom: 34px;
    padding: 15px 17px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    border: 1px solid rgba(74, 188, 209, 0.35);
    border-radius: 12px;

    background: rgba(74, 188, 209, 0.06);
}

.access-state strong,
.access-state span {
    display: block;
}

.access-state > div > span {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.access-badge,
.visibility-pill {
    flex: 0 0 auto;

    padding: 5px 9px;

    border: 1px solid var(--border);
    border-radius: 999px;

    background: var(--surface-raised);
    color: var(--text-muted);

    font-size: 0.78rem;
}

.app-section {
    scroll-margin-top: 100px;
    padding: 34px 0;
}

.app-section + .app-section {
    border-top: 1px solid var(--border);
}

.app-section-heading {
    margin-bottom: 20px;

    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
}

.app-section-heading h2 {
    margin: 0 0 6px;
    font-size: 1.55rem;
}

.app-section-heading p {
    max-width: 760px;
    margin: 0;

    color: var(--text-muted);
}

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

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field > span {
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.field small {
    color: var(--text-muted);
}

.field-wide {
    grid-column: 1 / -1;
}

.colour-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px;
}

.colour-swatch {
    border: 1px solid var(--border);
    border-radius: 10px;

    background: #4ABCD1;
}

.privacy-grid,
.entity-list,
.settings-grid {
    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: var(--surface);
}

.privacy-row,
.entity-row,
.setting-card {
    padding: 15px 16px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    border-bottom: 1px solid var(--border);
}

.privacy-row:last-child,
.entity-row:last-child,
.setting-card:last-child {
    border-bottom: none;
}

.privacy-row strong,
.privacy-row span {
    display: block;
}

.privacy-row span {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.privacy-row select {
    width: 140px;
}

.entity-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.entity-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.text-button {
    padding: 0;

    border: none;
    background: none;

    color: var(--primary);

    font: inherit;
    font-weight: 700;

    cursor: pointer;
}

.placeholder-panel,
.current-switch-card,
.upload-panel {
    padding: 18px;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: var(--surface);
}

.placeholder-panel strong,
.placeholder-panel span {
    display: block;
}

.placeholder-panel span {
    margin-top: 5px;
    color: var(--text-muted);
}

.current-switch-card,
.upload-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.muted-label {
    display: block;
    margin-bottom: 9px;

    color: var(--text-muted);
    font-size: 0.85rem;
}

.switch-members {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.switch-members span {
    padding: 6px 10px;

    border-radius: 999px;

    background: var(--surface-raised);
}

.switch-time {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.upload-panel p {
    max-width: 620px;
    margin: 5px 0 0;

    color: var(--text-muted);
}

.upload-button {
    cursor: pointer;
}

.upload-button input {
    display: none;
}

.settings-grid {
    display: grid;
}

.setting-card {
    cursor: pointer;
}

.setting-card strong,
.setting-card span {
    display: block;
}

.setting-card span {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.setting-card input {
    width: 18px;
    height: 18px;
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 210px minmax(0, 1fr);
    }

    .app-main {
        padding: 40px 28px 70px;
    }
}

@media (max-width: 760px) {
    .app-shell {
        display: block;
    }

    .app-sidebar {
        position: static;

        height: auto;

        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .app-sidebar-bottom {
        display: none;
    }

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

    .app-page-toolbar,
    .app-section-heading,
    .current-switch-card,
    .upload-panel,
    .privacy-row {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .field-wide {
        grid-column: auto;
    }

    .privacy-row select {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .app-main {
        padding: 30px 18px 60px;
    }

    .app-nav {
        grid-template-columns: 1fr;
    }

    .entity-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .entity-actions {
        width: 100%;
        justify-content: space-between;
    }

    .access-state {
        align-items: flex-start;
        flex-direction: column;
    }
}



/* Privacy and status pages */

.info-hero {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 76px 24px 46px;
}

.info-hero h1 {
    max-width: 850px;
    margin: 0 0 20px;
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1;
}

.info-hero > p:last-child,
.status-title-row p {
    max-width: 760px;
    margin: 0;
    color: var(--text-muted);
    font-size: 1.08rem;
}

.info-layout {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 20px 24px 90px;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 64px;
}

.info-toc {
    position: sticky;
    top: 96px;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.info-toc strong {
    margin-bottom: 6px;
    font-size: .84rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
}

.info-toc a {
    padding: 7px 9px;
    border-radius: 8px;
    color: var(--text-muted);
}

.info-toc a:hover {
    background: var(--surface);
    color: var(--text);
}

.info-content {
    min-width: 0;
}

.info-section {
    scroll-margin-top: 100px;
    padding: 0 0 52px;
}

.info-section + .info-section {
    padding-top: 52px;
    border-top: 1px solid var(--border);
}

.info-section h2 {
    max-width: 760px;
    margin: 0 0 16px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
}

.info-section > p:not(.eyebrow) {
    max-width: 820px;
    color: var(--text-muted);
}

.visibility-grid {
    margin-top: 26px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.visibility-card,
.info-note,
.status-explainer,
.status-service,
.status-detail-card,
.empty-state {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.visibility-card {
    padding: 20px;
}

.visibility-card h3 {
    margin: 16px 0 8px;
    font-size: 1.05rem;
}

.visibility-card p,
.info-note p,
.status-explainer p,
.status-service p,
.empty-state p {
    margin: 0;
    color: var(--text-muted);
}

.visibility-badge {
    display: inline-flex;
    padding: 5px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-raised);
    color: var(--text);
    font-size: .78rem;
    font-weight: 700;
}

.info-note {
    margin-top: 22px;
    padding: 18px 20px;
}

.info-note strong {
    display: block;
    margin-bottom: 5px;
}

.privacy-example {
    margin: 26px 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.privacy-example > div {
    padding: 15px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--border);
}

.privacy-example > div:last-child {
    border-bottom: 0;
}

.privacy-example span {
    color: var(--text-muted);
}

.status-title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
}

.status-title-row h1 {
    margin-bottom: 20px;
}

.status-overall {
    flex: 0 0 auto;
    padding: 9px 12px;
    border-radius: 999px;
    font-size: .84rem;
    font-weight: 700;
}

.status-development {
    border: 1px solid var(--border);
    background: var(--surface-raised);
    color: var(--text-muted);
}

.status-page {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 12px 24px 90px;
}

.status-explainer {
    margin-bottom: 22px;
    padding: 18px 20px;
}

.status-explainer strong {
    display: block;
    margin-bottom: 5px;
}

.status-service-list {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.status-service {
    padding: 19px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
}

.status-service:last-child {
    border-bottom: 0;
}

.status-service-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-service-title h2 {
    margin: 0;
    font-size: 1.08rem;
}

.status-service p {
    margin: 4px 0 0 24px;
}

.status-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border-radius: 50%;
}

.status-dot-pending {
    background: var(--text-muted);
}

.status-value {
    flex: 0 0 auto;
    color: var(--text-muted);
    font-size: .9rem;
    font-weight: 700;
}

.status-detail-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.status-detail-card {
    padding: 20px;
}

.status-detail-card h3 {
    margin: 0 0 16px;
}

.status-detail-card dl {
    margin: 0;
}

.status-detail-card dl > div {
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--border);
}

.status-detail-card dl > div:last-child {
    border-bottom: 0;
}

.status-detail-card dt {
    color: var(--text-muted);
}

.status-detail-card dd {
    margin: 0;
    font-weight: 700;
}

.status-history {
    padding-top: 64px;
}

.empty-state {
    padding: 26px;
    text-align: center;
}

.empty-state strong {
    display: block;
    margin-bottom: 5px;
}

@media (max-width: 900px) {
    .info-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .info-toc {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .info-toc strong {
        grid-column: 1 / -1;
    }

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

    .status-title-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 700px) {
    .status-detail-grid {
        grid-template-columns: 1fr;
    }

    .status-service,
    .privacy-example > div {
        align-items: flex-start;
        flex-direction: column;
    }

    .status-value {
        margin-left: 24px;
    }
}

@media (max-width: 560px) {
    .info-hero {
        padding-top: 54px;
    }

    .info-layout,
    .status-page {
        padding-left: 16px;
        padding-right: 16px;
    }

    .info-toc {
        grid-template-columns: 1fr;
    }

    .info-toc strong {
        grid-column: auto;
    }
}


/* Final dashboard/system surface */
body:not(.is-authorized) .auth-only {
    display: none !important;
}

body.is-authorized .viewer-only {
    display: none !important;
}

.system-shell {
    min-height: calc(100vh - 69px);
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    background: var(--background);
}

.system-sidebar {
    position: sticky;
    top: 69px;
    height: calc(100vh - 69px);
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    border-right: 1px solid var(--border);
    background: var(--surface);
}

.account-summary,
.directory-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-summary strong,
.account-summary span,
.directory-identity strong,
.directory-identity span,
.compact-card strong,
.compact-card span,
.settings-list strong,
.settings-list span {
    display: block;
}

.account-summary span,
.directory-identity span,
.compact-card span,
.settings-list span,
.muted-label {
    color: var(--text-muted);
    font-size: .86rem;
}

.avatar-small {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(74,188,209,.24), rgba(142,108,136,.28));
    font-weight: 800;
}

.system-picker {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.system-picker > span {
    color: var(--text-muted);
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.system-picker select,
.directory-toolbar input,
.directory-toolbar select,
.privacy-row select,
.colour-value {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-raised);
    color: var(--text);
    font: inherit;
}

.system-picker select,
.directory-toolbar input,
.directory-toolbar select,
.privacy-row select,
.colour-value {
    padding: 10px 12px;
}

.system-nav,
.system-sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.system-nav {
    margin-top: 22px;
}

.system-nav a,
.system-sidebar-footer a {
    padding: 9px 11px;
    border-radius: 9px;
    color: var(--text-muted);
}

.system-nav a:hover,
.system-sidebar-footer a:hover,
.system-nav a.active {
    background: var(--surface-raised);
    color: var(--text);
}

.system-nav a.active {
    border-left: 3px solid var(--primary);
}

.system-content {
    min-width: 0;
    width: 100%;
    max-width: 1180px;
    padding: 42px 42px 90px;
}

.profile-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
}

.profile-banner {
    min-height: 190px;
    padding: 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(135deg, rgba(74,188,209,.18), rgba(142,108,136,.24));
    color: var(--text-muted);
}

.profile-body {
    padding: 0 28px 28px;
}

.profile-header {
    margin-top: -48px;
    display: flex;
    align-items: flex-end;
    gap: 20px;
}

.profile-avatar {
    position: relative;
    width: 104px;
    height: 104px;
    flex: 0 0 104px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 5px solid var(--surface);
    border-radius: 24px;
    background: var(--surface-raised);
    font-size: 1.6rem;
    font-weight: 800;
}

.profile-header-main {
    min-width: 0;
    flex: 1;
    padding-top: 58px;
}

.profile-title-line,
.section-top,
.pagination,
.settings-list label,
.danger-zone,
.action-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.profile-title-line h1 {
    margin: 0 0 6px;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.05;
}

.profile-title-line p,
.profile-description,
.section-top p,
.action-card p,
.danger-zone p {
    color: var(--text-muted);
}

.profile-title-line p,
.section-top p,
.action-card p,
.danger-zone p {
    margin: 4px 0 0;
}

.profile-actions,
.profile-meta,
.directory-meta,
.pagination > div,
.switch-members {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.profile-meta {
    margin-top: 12px;
    color: var(--text-muted);
    font-size: .9rem;
}

.profile-description {
    max-width: 780px;
    margin: 24px 0 0;
}

.image-action,
.avatar-action {
    cursor: pointer;
    font-size: .82rem;
    font-weight: 700;
}

.image-action input,
.avatar-action input,
.upload-button input {
    display: none;
}

.avatar-action {
    position: absolute;
    right: -4px;
    bottom: -4px;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-raised);
}

.image-action {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: rgba(15,17,21,.76);
    color: var(--text);
}

.state-note {
    margin-top: 24px;
    padding: 15px 17px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid rgba(74,188,209,.35);
    border-radius: 12px;
    background: rgba(74,188,209,.06);
}

.state-note strong,
.state-note span {
    display: block;
}

.state-note div span {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: .9rem;
}

.section-top {
    align-items: flex-end;
    margin-bottom: 20px;
}

.section-top h2 {
    margin: 0 0 6px;
    font-size: 1.55rem;
}

.colour-control {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
}

.colour-picker {
    width: 52px;
    height: 48px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
}

.colour-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.colour-picker::-webkit-color-swatch {
    border: none;
    border-radius: 9px;
}

.colour-picker::-moz-color-swatch {
    border: none;
    border-radius: 9px;
}

.colour-value {
    height: 48px;
}

.directory-toolbar {
    margin-bottom: 14px;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 12px;
}

.directory-toolbar > div {
    display: flex;
    gap: 8px;
}

.directory-list,
.privacy-list,
.settings-list {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.directory-row,
.privacy-row,
.settings-list label {
    padding: 15px 16px;
    border-bottom: 1px solid var(--border);
}

.directory-row:last-child,
.privacy-row:last-child,
.settings-list label:last-child {
    border-bottom: 0;
}

.directory-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-raised);
    color: var(--text-muted);
    font-size: .78rem;
    font-weight: 700;
}

.pagination {
    margin-top: 14px;
    color: var(--text-muted);
    font-size: .9rem;
}

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

.compact-card,
.action-card,
.switch-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.action-card {
    align-items: flex-start;
}

.switch-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.switch-card > span {
    color: var(--text-muted);
}

.switch-members {
    margin-top: 6px;
}

.switch-members span {
    padding: 5px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-raised);
}

.privacy-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.privacy-row strong,
.privacy-row span {
    display: block;
}

.privacy-row span {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: .86rem;
}

.privacy-row select {
    width: 140px;
}

.settings-list label {
    cursor: pointer;
}

.settings-list input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    accent-color: var(--primary);
}

.danger-zone {
    margin-top: 24px;
    padding: 18px;
    align-items: flex-start;
    border: 1px solid rgba(220, 90, 90, .34);
    border-radius: 12px;
    background: rgba(220, 90, 90, .04);
}

.danger-button {
    flex: 0 0 auto;
    padding: 10px 13px;
    border: 1px solid rgba(220, 90, 90, .52);
    border-radius: 9px;
    background: transparent;
    color: #ef9a9a;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.danger-button:hover {
    background: rgba(220, 90, 90, .08);
}

@media (max-width: 980px) {
    .system-shell {
        grid-template-columns: 1fr;
    }

    .system-sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .system-nav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .system-sidebar-footer {
        flex-direction: row;
    }

    .system-content {
        max-width: none;
    }
}

@media (max-width: 760px) {
    .system-content {
        padding: 28px 18px 70px;
    }

    .profile-banner {
        min-height: 150px;
    }

    .profile-body {
        padding: 0 18px 20px;
    }

    .profile-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-header-main {
        width: 100%;
        padding-top: 0;
    }

    .profile-title-line,
    .section-top,
    .pagination,
    .state-note,
    .switch-card,
    .danger-zone,
    .action-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .directory-toolbar {
        grid-template-columns: 1fr;
    }

    .directory-toolbar > div {
        flex-wrap: wrap;
    }

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

    .field-wide {
        grid-column: auto;
    }

    .directory-row,
    .privacy-row,
    .settings-list label {
        align-items: flex-start;
    }

    .directory-meta {
        justify-content: flex-end;
    }
}

@media (max-width: 560px) {
    .system-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .directory-row,
    .privacy-row,
    .settings-list label {
        flex-direction: column;
    }

    .directory-meta {
        justify-content: flex-start;
    }

    .privacy-row select {
        width: 100%;
    }
}

/* Public system/member pages */
.public-profile-shell {
    width: min(900px, calc(100% - 36px));
    margin: 0 auto;
    padding: 56px 0 90px;
}

.discord-profile-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 16px;
    background: var(--surface);
}

.discord-profile-banner {
    min-height: 190px;
    background: linear-gradient(135deg, rgba(74,188,209,.18), rgba(142,108,136,.24));
    background-position: center;
    background-size: cover;
}

.discord-profile-content {
    padding: 28px;
}

.discord-profile-header {
    display: flex;
    align-items: center;
    gap: 18px;
}

.discord-profile-avatar {
    width: 82px;
    height: 82px;
    flex: 0 0 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface-raised);
    background-position: center;
    background-size: cover;
    font-size: 1.3rem;
    font-weight: 800;
}

.discord-profile-header h1 {
    margin: 0 0 6px;
    font-size: clamp(1.8rem, 5vw, 2.8rem);
}

.discord-profile-header p {
    margin: 0;
}

.discord-profile-section {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.discord-profile-section h2 {
    margin: 0 0 10px;
    font-size: 1.05rem;
}

.discord-profile-section p {
    margin: 0;
    color: var(--text-muted);
    white-space: pre-wrap;
}

.discord-profile-section > strong,
.discord-profile-section > span {
    display: block;
}

.discord-profile-section > span {
    margin-top: 4px;
    color: var(--text-muted);
}

.discord-profile-actions {
    margin-top: 24px;
    padding-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border-top: 1px solid var(--border);
}

.public-profile-status {
    margin: 18px 0 0;
    color: var(--text-muted);
    font-size: .88rem;
}

/* Logged-out dashboard landing */
.app-login {
    min-height: calc(100vh - 69px);
    display: grid;
    place-items: center;
    padding: 48px 20px;
}

.app-login-card {
    width: min(620px, 100%);
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
}

.app-login-card h1 {
    margin: 8px 0 14px;
    font-size: clamp(2rem, 6vw, 3.4rem);
}

.app-login-card > p:not(.eyebrow) {
    color: var(--text-muted);
}

.app-login-note {
    margin: 18px 0 0;
    font-size: .86rem;
}

@media (max-width: 640px) {
    .discord-profile-content {
        padding: 22px 18px;
    }

    .discord-profile-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-login-card {
        padding: 26px 20px;
    }
}


/* Live dashboard authentication state */
body.auth-loading > .site-header,
body.auth-loading > .app-login,
body.auth-loading > .system-shell {
    visibility: hidden;
}

.auth-loading-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 48px 20px;
}

.auth-loading-screen[hidden] {
    display: none;
}

.sidebar-link-button {
    width: 100%;
    padding: 9px 11px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.sidebar-link-button:hover {
    background: var(--surface-raised);
    color: var(--text);
}

.sidebar-link-button:disabled {
    opacity: .55;
    cursor: wait;
}

.avatar-small img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: inherit;
    object-fit: cover;
}

.dashboard-auth-card {
    max-width: 760px;
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
}

.dashboard-auth-card h1 {
    margin: 8px 0 12px;
    font-size: clamp(2rem, 5vw, 3.4rem);
}

.dashboard-auth-card > p:not(.eyebrow) {
    color: var(--text-muted);
}

.dashboard-auth-user {
    margin-top: 24px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-raised);
}

.dashboard-auth-user strong,
.dashboard-auth-user span {
    display: block;
}

.dashboard-auth-user span {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: .88rem;
}


/* Authenticated dashboard system list */
.dashboard-systems-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.dashboard-systems-heading h2 {
    margin: 0.2rem 0 0;
    font-size: 1.15rem;
}

.dashboard-systems-heading > span {
    color: var(--muted);
    font-size: 0.9rem;
    text-align: right;
}

.dashboard-systems-list {
    display: grid;
    gap: 0.8rem;
}

.dashboard-system-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel-soft);
}

.dashboard-system-identity {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.dashboard-system-identity > span {
    color: var(--muted);
    font-size: 0.9rem;
}

.dashboard-system-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.dashboard-system-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.55rem;
}

@media (max-width: 720px) {
    .dashboard-systems-heading,
    .dashboard-system-card {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-systems-heading > span {
        text-align: left;
    }

    .dashboard-system-actions {
        justify-content: flex-start;
    }
}


/* Live system management profile */
.profile-avatar img,
.profile-banner {
    background-position: center;
    background-size: cover;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.profile-avatar > span {
    position: relative;
    z-index: 1;
}


/* Dashboard CRUD */
.member-editor {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel-soft);
}

.member-editor-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

.member-editor-actions > div {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.8rem;
}

.form-status {
    color: var(--muted);
    font-size: 0.9rem;
}

.settings-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.settings-toggle > div {
    display: grid;
    gap: 0.25rem;
}

.settings-toggle span {
    color: var(--muted);
    font-size: 0.9rem;
}

.avatar-small img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

@media (max-width: 720px) {
    .member-editor-actions,
    .member-editor-actions > div {
        align-items: stretch;
        flex-direction: column;
    }
}


/* Dashboard systems + media + danger zone */
.dashboard-systems-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.inline-create-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: end;
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel-soft);
}

.inline-create-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.7rem;
}

.image-actions {
    position: absolute;
    inset: auto 1rem 1rem auto;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.image-action,
.avatar-action {
    cursor: pointer;
}

.image-action input,
.avatar-action input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

.image-remove {
    border: 0;
    font: inherit;
}

.member-media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.member-media-grid input[type="file"] {
    width: 100%;
}

.media-clear-button {
    width: max-content;
    margin-top: 0.35rem;
}

.danger-zone {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.danger-zone h3 {
    margin: 0.2rem 0 0.35rem;
}

.danger-zone p {
    margin: 0;
}

.danger-zone-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

@media (max-width: 760px) {
    .inline-create-form,
    .member-media-grid {
        grid-template-columns: 1fr;
    }

    .inline-create-actions,
    .danger-zone-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-systems-controls {
        align-items: flex-start;
        justify-content: flex-start;
    }
}


/* Respect HTML hidden state across dashboard UI */
[hidden] {
    display: none !important;
}


/* Dashboard polish / upload fixes */
#auth-loading-screen {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 1rem;
    overflow: auto;
}

#auth-loading-screen[hidden] {
    display: none !important;
}

.system-banner {
    position: relative;
}

.system-banner .image-actions {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    left: auto;
    top: auto;
    z-index: 2;
}

@media (max-width: 760px) {
    .system-banner .image-actions {
        right: 0.75rem;
        bottom: 0.75rem;
        left: 0.75rem;
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .profile-actions {
        width: 100%;
        align-items: stretch;
        flex-wrap: wrap;
    }

    .profile-actions .button {
        flex: 1 1 10rem;
    }
}
