/**
 * Public team output – Accordion, Sticky, Embed, Design tokens via profiles.
 * Self-contained — no dependency on admin app.css.
 *
 * Host / design profile tokens (--xup-teams-*) can be overridden.
 * Sticky host offset: --xup-teams-sticky-offset (aliased as --xup-public-sticky-offset)
 */

:root {
    --xup-teams-sticky-offset: 0px;
    --xup-public-sticky-offset: var(--xup-teams-sticky-offset);
    --xup-public-accordion-ms: 250ms;
    /* MS69: großzügigere geschlossene Zeilen + Logos */
    --xup-public-row-height: 4.65rem;
    --xup-embed-logo-size: 4.75rem;
    --xup-embed-card-padding: 0.9rem 0.75rem;
    --xup-embed-gap: 0.85rem;
    --xup-embed-columns: 3;
}

.page-public {
    /* Public theme tokens (neutral defaults; design profile may override via inline style). */
    --xup-teams-primary: #1f5f7a;
    --xup-teams-accent: #1f5f7a;
    --xup-teams-surface: #ffffff;
    --xup-teams-surface-muted: #f7f9fb;
    --xup-teams-text: #1a2330;
    --xup-teams-text-muted: #5a6776;
    --xup-teams-border: #d2dbe4;
    --xup-teams-radius: 12px;
    --xup-teams-font-family: "Segoe UI", "Helvetica Neue", sans-serif;
    --xup-teams-content-max-width: 1140px;
    --xup-teams-space: 1rem;

    /* Internal aliases. */
    --xup-public-bg: #f4f6f8;
    --xup-public-bg-accent: #e7eef3;
    --xup-public-surface: var(--xup-teams-surface);
    --xup-public-surface-soft: var(--xup-teams-surface-muted);
    --xup-public-text: var(--xup-teams-text);
    --xup-public-muted: var(--xup-teams-text-muted);
    --xup-public-line: var(--xup-teams-border);
    --xup-public-accent: var(--xup-teams-primary);
    --xup-public-accent-soft: #e4f0f5;
    --xup-public-focus: #3d7a94;
    --xup-public-radius: var(--xup-teams-radius);
    --xup-public-shadow: 0 4px 14px rgba(26, 35, 48, 0.07);
    --xup-public-font: var(--xup-teams-font-family);
    --xup-public-crown-gold: #c9a227;
    --xup-public-crown-silver: #8a95a3;
    --xup-public-space: var(--xup-teams-space);
    /* Structural aliases (light defaults; dark overrides via theme). */
    --xup-public-divider: #e6ebf0;
    --xup-public-caption-bg: #f7fafc;
    --xup-public-caption-text: var(--xup-public-muted);
    --xup-public-media-frame-bg: #edf2f6;
    --xup-public-media-surface: #e8eef3;
    --xup-public-member-bg: rgba(255, 255, 255, 0.72);
    --xup-public-member-border: #ebe6dc;
    --xup-public-surface-raised: #fbfcfd;
    --xup-public-row: var(--xup-public-surface);
    --xup-public-panel: var(--xup-public-surface-soft);
    --xup-public-block: var(--xup-public-surface-soft);
}

body.page-public {
    margin: 0;
    min-height: 100vh;
    box-sizing: border-box;
    font-family: var(--xup-public-font);
    color: var(--xup-public-text);
    background:
        radial-gradient(circle at 12% 0%, #d9e7ef 0%, transparent 42%),
        linear-gradient(180deg, var(--xup-public-bg-accent), var(--xup-public-bg));
}

body.page-public *,
body.page-public *::before,
body.page-public *::after {
    box-sizing: border-box;
}

/* —— Public shell (matches XUP-Teams content width) —— */
body.page-public .page {
    width: min(var(--xup-teams-content-max-width, 920px), calc(100% - 2.5rem));
    margin: 0 auto;
    padding: 1.25rem 0 2.5rem;
}

body.page-public .site-header,
body.page-public .site-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem 1rem;
    flex-wrap: wrap;
}

body.page-public .site-header {
    border-bottom: 1px solid var(--xup-public-line);
    background: transparent;
    padding-bottom: 0.75rem;
}

body.page-public .site-header-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.45rem 0.65rem;
    margin-left: auto;
}

body.page-public .site-header-version,
body.page-public .meta {
    margin: 0;
    color: var(--xup-public-muted);
    font-size: 0.82rem;
    font-weight: 500;
}

body.page-public .brand {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

body.page-public .brand-surface {
    display: inline-block;
    padding: 0.28rem 0.55rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--xup-public-text);
    border: 1px solid rgba(28, 36, 48, 0.08);
    box-shadow: 0 1px 2px rgba(28, 36, 48, 0.06);
    text-decoration: none;
    line-height: 1.2;
}

body.page-public .brand-link {
    color: inherit;
    text-decoration: none;
}

body.page-public .brand-link:focus-visible {
    outline: 2px solid var(--xup-public-focus);
    outline-offset: 2px;
}

body.page-public .content {
    margin-top: 1.25rem;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
}

body.page-public .site-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--xup-public-line);
    color: var(--xup-public-muted);
}

body.page-public .site-footer p {
    margin: 0;
    font-size: 0.95rem;
}

/* Embed: minimal shell — neutralize overview gradients (stripe banding in iframes) */
body.page-public.page-public-embed {
    min-height: 0;
    background-image: none;
    background: var(--xup-public-bg);
}

body.page-public-embed .page,
body.page-public-embed .page-embed-shell {
    width: min(72rem, 100%);
    margin: 0 auto;
    padding: 0.25rem;
    min-height: 0;
}

body.page-public-embed .content-embed {
    margin-top: 0;
    padding: 0;
}

body.xup-public-lightbox-open {
    overflow: hidden;
}

.xup-public-hero {
    margin: 0 0 1rem;
}

.xup-public-hero h1,
.xup-public-notfound h1 {
    margin: 0 0 0.3rem;
    font-size: clamp(1.45rem, 2.8vw, 1.85rem);
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--xup-public-text);
}

.xup-public-lead,
.xup-public-notfound p {
    margin: 0;
    color: var(--xup-public-muted);
    max-width: 40rem;
}

.xup-public-link {
    color: var(--xup-public-accent);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.xup-public-empty {
    margin: 0;
    padding: 1rem;
    background: var(--xup-public-surface);
    border: 1px dashed var(--xup-public-line);
    border-radius: var(--xup-public-radius);
    color: var(--xup-public-muted);
}

/* —— Accordion —— */
.xup-public-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-width: 100%;
    min-width: 0;
}

.xup-public-team {
    margin: 0;
    background: var(--xup-public-surface);
    border: 1px solid var(--xup-public-line);
    border-radius: var(--xup-public-radius);
    box-shadow: var(--xup-public-shadow);
    /* Sticky summary stays within this team container only */
    scroll-margin-top: calc(var(--xup-teams-sticky-offset, var(--xup-public-sticky-offset, 0px)) + 0.35rem);
}

.xup-public-team-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: var(--xup-public-row-height);
    height: var(--xup-public-row-height);
    padding: 0.55rem 1rem;
    cursor: pointer;
    list-style: none;
    background: var(--xup-public-surface);
    border-radius: var(--xup-public-radius);
    border-bottom: 0;
}

/* Desktop: single-line meta. Narrow viewports: controlled wrap (see @media). */

.xup-public-team-trigger::-webkit-details-marker {
    display: none;
}

.xup-public-team-trigger::marker {
    content: "";
}

.xup-public-team-trigger:focus-visible {
    outline: 2px solid var(--xup-public-focus);
    outline-offset: -2px;
}

.xup-public-team[open] > .xup-public-team-trigger {
    position: sticky;
    top: calc(var(--xup-teams-sticky-offset, var(--xup-public-sticky-offset, 0px)) + env(safe-area-inset-top, 0px));
    z-index: 4;
    min-height: var(--xup-public-row-height);
    height: var(--xup-public-row-height);
    border-radius: var(--xup-public-radius) var(--xup-public-radius) 0 0;
    background: var(--xup-public-surface);
    box-shadow: 0 2px 8px rgba(26, 35, 48, 0.04);
}

.xup-public-team-trigger-main {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    flex: 1;
}

.xup-public-team-identity {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 0.1rem;
    min-width: 0;
    flex: 1;
}

.xup-public-team-name {
    display: block;
    max-width: 100%;
    font-size: clamp(1.2rem, 2.1vw, 1.45rem);
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* MS69: geöffnete Mannschaft — Name klar hervorgehoben */
.xup-public-team[open] > .xup-public-team-trigger .xup-public-team-name {
    font-size: clamp(1.3rem, 2.3vw, 1.6rem);
    font-weight: 750;
    letter-spacing: -0.01em;
    color: var(--xup-public-focus);
}

.xup-public-row-meta {
    display: block;
    max-width: 100%;
    min-width: 0;
    color: var(--xup-public-muted);
    font-size: 0.8rem;
    line-height: 1.25;
    text-align: left;
}

.xup-public-row-meta-text {
    display: block;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.xup-public-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 3.75rem;
    width: 3.75rem;
    height: 3.75rem;
    margin-top: 0;
    border-radius: 8px;
    background: var(--xup-public-accent-soft);
    overflow: hidden;
}

.xup-public-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.xup-public-logo-placeholder {
    background: linear-gradient(135deg, #e8eef3, #f7fafc);
}

.xup-public-chevron {
    flex: 0 0 1.4rem;
    width: 1.4rem;
    height: 1.4rem;
    margin-top: 0;
    border-radius: 50%;
    background:
        transparent
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%215a6776'%3E%3Cpath d='M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z'/%3E%3C/svg%3E")
        center / 1rem no-repeat;
    transition: transform var(--xup-public-accordion-ms) ease;
}

.xup-public-team[open] > .xup-public-team-trigger .xup-public-chevron {
    transform: rotate(180deg);
}

.xup-public-team-panel {
    border-radius: 0 0 var(--xup-public-radius) var(--xup-public-radius);
    transition: height var(--xup-public-accordion-ms) ease;
}

.xup-public-team-panel.is-animating {
    overflow: hidden;
}

.xup-public-team-panel-body {
    padding: 0 0.75rem 0.85rem;
}

/* —— Open panel stack: details → members → images —— */
.xup-public-panel-stack {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-width: 0;
}

.xup-public-block {
    margin: 0;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--xup-public-line);
    border-radius: 10px;
    background: var(--xup-public-surface-soft);
}

.xup-public-block-details {
    background: #f5f8fa;
}

.xup-public-block-members {
    background: #f8f7f4;
}

.xup-public-block-images {
    background: #f4f6f8;
    padding: 0.55rem 0.6rem;
}

.xup-public-section-title {
    margin: 0 0 0.55rem;
    font-size: 1.05rem;
    font-weight: 650;
}

.xup-public-section-title-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.xup-public-section-title-text {
    min-width: 0;
}

.xup-public-members-heading-icon {
    width: 0.95em;
    height: 0.95em;
    flex-shrink: 0;
    color: var(--xup-public-muted);
    opacity: 0.9;
}

.xup-public-member-person-icon {
    width: 0.92em;
    height: 0.92em;
    flex-shrink: 0;
    color: var(--xup-public-muted);
    opacity: 0.88;
}

.xup-public-facts {
    margin: 0;
    display: grid;
    gap: 0.2rem;
}

.xup-public-fact {
    display: grid;
    grid-template-columns: minmax(6.5rem, 10.5rem) minmax(0, 1fr);
    gap: 0.15rem 0.55rem;
    align-items: baseline;
    padding: 0.16rem 0;
    border-bottom: 1px solid var(--xup-public-divider);
}

.xup-public-fact:last-child {
    border-bottom: 0;
}

.xup-public-fact dt {
    margin: 0;
    color: var(--xup-public-muted);
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
}

.xup-public-fact dd {
    margin: 0;
    font-weight: 550;
    font-size: 0.92rem;
    overflow-wrap: anywhere;
    min-width: 0;
}

.xup-public-fact-hint {
    align-items: start;
}

.xup-public-intro-text {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.45;
    font-size: 0.9rem;
    font-weight: 500;
}

.xup-public-member-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.35rem;
}

.xup-public-member {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    padding: 0.4rem 0.55rem;
    border-radius: 8px;
    background: var(--xup-public-member-bg);
    border: 1px solid var(--xup-public-member-border);
    min-width: 0;
    min-height: 0;
}

.xup-public-member-name {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    font-size: 0.98rem;
    min-width: 0;
    flex: 1 1 auto;
}

.xup-public-member-name-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xup-public-member-role {
    position: relative;
    color: var(--xup-public-muted);
    font-size: 0.8rem;
    white-space: nowrap;
    flex: 0 0 auto;
    text-align: right;
}

.xup-public-role-short {
    display: none;
}

.xup-public-role-captain,
.xup-public-role-co-captain {
    border-color: #ddd5c4;
    background: rgba(255, 252, 245, 0.95);
}

.xup-public-role-captain .xup-public-member-role,
.xup-public-role-co-captain .xup-public-member-role {
    color: var(--xup-public-accent);
    font-weight: 600;
}

.xup-public-crown {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.xup-public-crown-icon {
    width: 1rem;
    height: 1rem;
}

.xup-public-crown-gold {
    color: var(--xup-public-crown-gold);
}

.xup-public-crown-silver {
    color: var(--xup-public-crown-silver);
}

/* —— Image previews —— */
.xup-public-media-stack {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.xup-public-figure-preview {
    margin: 0;
    overflow: hidden;
    border-radius: 8px;
    background: var(--xup-public-media-surface);
    border: 1px solid var(--xup-public-line);
}

.xup-public-image-trigger {
    display: block;
    color: inherit;
    text-decoration: none;
}

.xup-public-image-trigger:focus-visible {
    outline: 2px solid var(--xup-public-focus);
    outline-offset: 2px;
}

.xup-public-image-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 14rem;
    overflow: hidden;
    background: var(--xup-public-media-frame-bg);
    padding: 0.65rem 0.55rem;
}

.xup-public-image-frame img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

.xup-public-figcaption {
    margin: 0;
    margin-top: 0;
    padding: 0.4rem 0.55rem;
    font-size: 0.78rem;
    color: var(--xup-public-caption-text);
    background: var(--xup-public-caption-bg);
    border-top: 1px solid var(--xup-public-divider);
    white-space: pre-wrap;
    line-height: 1.35;
    text-align: center;
    overflow-wrap: anywhere;
}

.xup-public-empty-panel {
    margin: 0;
    color: var(--xup-public-muted);
    font-size: 0.9rem;
}

.xup-public-notfound {
    padding: 1.1rem 0;
}

/* —— Lightbox —— */
.xup-public-lightbox {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 1.25rem;
    background: rgba(12, 18, 24, 0.78);
}

.xup-public-lightbox[hidden] {
    display: none !important;
}

.xup-public-lightbox-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: min(96vw, 56rem);
    max-height: min(78vh, 42rem);
}

.xup-public-lightbox-img {
    display: block;
    max-width: 100%;
    max-height: min(78vh, 42rem);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    background: #111;
}

.xup-public-lightbox-caption {
    margin: 0;
    max-width: min(96vw, 40rem);
    color: #e8edf2;
    font-size: 0.9rem;
    text-align: center;
    white-space: pre-wrap;
}

.xup-public-lightbox-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
}

.xup-public-lightbox-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.xup-public-lightbox-close-icon {
    width: 1.35rem;
    height: 1.35rem;
}

/* —— Embed —— */
.xup-public-embed-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(var(--xup-embed-columns, 3), minmax(0, 1fr));
    gap: var(--xup-embed-gap, 0.75rem);
    align-items: stretch;
}

.xup-public-embed-item {
    margin: 0;
    min-width: 0;
    display: flex;
}

.xup-public-embed-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: var(--xup-embed-card-padding, 0.55rem);
    text-decoration: none;
    color: inherit;
    background: var(--xup-public-surface);
    border: 1px solid var(--xup-public-line);
    border-radius: var(--xup-teams-radius);
    box-shadow: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.xup-public-embed-link:hover {
    box-shadow: none;
    border-color: var(--xup-public-focus);
    background: var(--xup-public-surface-soft);
}

.xup-public-embed-link:focus-visible {
    outline: 2px solid var(--xup-public-focus);
    outline-offset: 2px;
}

/* Logo fills card content width (1:1) */
.xup-public-embed-link .xup-public-logo {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 0;
    border-radius: 8px;
    background: transparent;
    overflow: hidden;
}

.xup-public-embed-link .xup-public-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.xup-public-embed-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-align: center;
    font-weight: 650;
    font-size: 0.92rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
    max-width: 100%;
}

/* Size presets control card density / columns */
body.xup-embed-size-small {
    --xup-embed-card-padding: 0.4rem;
    --xup-embed-gap: 0.45rem;
}

body.xup-embed-size-small .xup-public-embed-grid {
    grid-template-columns: repeat(auto-fill, minmax(6.75rem, 1fr));
}

body.xup-embed-size-standard {
    --xup-embed-card-padding: 0.55rem;
    --xup-embed-gap: 0.7rem;
}

body.xup-embed-size-standard .xup-public-embed-grid {
    grid-template-columns: repeat(var(--xup-embed-columns, 3), minmax(0, 1fr));
}

body.xup-embed-size-large {
    --xup-embed-card-padding: 0.7rem;
    --xup-embed-gap: 0.85rem;
}

body.xup-embed-size-large .xup-public-embed-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.xup-embed-size-auto {
    --xup-embed-card-padding: 0.55rem;
    --xup-embed-gap: 0.7rem;
}

body.xup-embed-size-auto .xup-public-embed-grid {
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
}

/* Flat solid theme colors — no gradients (iframe stripe banding) */
body.page-public-embed {
    min-height: 0;
    background: var(--xup-public-bg);
}

html.xup-embed-root {
    min-height: 0;
    background: var(--xup-public-bg);
}

body.xup-embed-theme-light {
    --xup-teams-surface: #ffffff;
    --xup-teams-surface-muted: #f3f6f9;
    --xup-teams-text: #1a2330;
    --xup-teams-text-muted: #5a6776;
    --xup-teams-border: #d2dbe4;
    --xup-public-bg: #eef2f5;
    --xup-public-bg-accent: #eef2f5;
    --xup-public-focus: #3d7a94;
    --xup-public-shadow: none;
    color: var(--xup-teams-text);
    background: var(--xup-public-bg);
}

body.xup-embed-theme-dark {
    --xup-teams-surface: #1b242e;
    --xup-teams-surface-muted: #222c38;
    --xup-teams-text: #e8eef4;
    --xup-teams-text-muted: #a7b4c2;
    --xup-teams-border: #334152;
    --xup-public-bg: #12181f;
    --xup-public-bg-accent: #12181f;
    --xup-public-surface: #1b242e;
    --xup-public-surface-soft: #222c38;
    --xup-public-surface-raised: #222c38;
    --xup-public-text: #e8eef4;
    --xup-public-muted: #a7b4c2;
    --xup-public-line: #334152;
    --xup-public-focus: #6a9bb0;
    --xup-public-shadow: none;
    color: var(--xup-public-text);
    background: var(--xup-public-bg);
}

body.xup-embed-theme-dark .xup-public-embed-link:hover {
    background: var(--xup-teams-surface-muted);
    border-color: var(--xup-public-focus);
    box-shadow: none;
}

html.xup-embed-root:has(body.xup-embed-surface-transparent),
html.xup-embed-surface-transparent,
body.xup-embed-surface-transparent {
    background: transparent !important;
}

body.xup-embed-surface-transparent .page,
body.xup-embed-surface-transparent .page-embed-shell,
body.xup-embed-surface-transparent .content-embed,
body.xup-embed-surface-transparent .xup-public-embed {
    background: transparent;
}

body.xup-embed-surface-transparent .xup-public-embed-link {
    box-shadow: none;
}

body.xup-embed-surface-transparent .xup-public-embed-link:hover {
    box-shadow: none;
    background: var(--xup-public-surface-soft);
}

body.page-public-embed .page,
body.page-public-embed .page-embed-shell {
    width: min(72rem, 100%);
    margin: 0 auto;
    padding: 0.25rem;
    min-height: 0;
    background: transparent;
}

body.page-public-embed .content-embed {
    margin-top: 0;
    padding: 0;
}

@media (max-width: 1023px) {
    body.xup-embed-size-standard .xup-public-embed-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    body.page-public .page {
        width: min(var(--xup-teams-content-max-width, 920px), calc(100% - 1.5rem));
    }

    .xup-public-image-frame {
        height: 12.5rem;
    }

    /* Meta may wrap; row height follows content (no clipped sticky bar). */
    .xup-public-team-trigger,
    .xup-public-team[open] > .xup-public-team-trigger {
        height: auto;
        align-items: flex-start;
        padding-top: 0.45rem;
        padding-bottom: 0.45rem;
    }

    .xup-public-team-trigger-main {
        align-items: flex-start;
    }

    .xup-public-logo {
        margin-top: 0.05rem;
    }

    .xup-public-chevron {
        margin-top: 0.45rem;
    }

    .xup-public-row-meta-text {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 700px) {
    body.xup-embed-size-large .xup-public-embed-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    body.xup-embed-size-standard .xup-public-embed-grid {
        grid-template-columns: 1fr;
    }

    body.xup-embed-size-small .xup-public-embed-grid {
        grid-template-columns: repeat(auto-fill, minmax(5.75rem, 1fr));
    }

    body.xup-embed-size-auto .xup-public-embed-grid {
        grid-template-columns: repeat(auto-fill, minmax(7.25rem, 1fr));
    }

    .xup-public-team-trigger {
        padding: 0.35rem 0.6rem;
    }

    .xup-public-team-panel-body {
        padding: 0 0.6rem 0.75rem;
    }
}

/* Keep label+value on one line until extremely narrow viewports */
@media (max-width: 340px) {
    .xup-public-fact {
        grid-template-columns: 1fr;
        gap: 0.05rem;
    }

    .xup-public-fact dt {
        white-space: normal;
    }
}

@media (max-width: 430px) {
    /* Keep member rows single-line; show short role visually, full role for SR. */
    .xup-public-role-full {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .xup-public-role-short {
        display: inline;
    }

    .xup-public-member {
        gap: 0.35rem;
    }

    .xup-public-member-role {
        font-size: 0.78rem;
    }
}

@media (max-width: 360px) {
    .xup-public-logo {
        flex-basis: 3rem;
        width: 3rem;
        height: 3rem;
    }

    .xup-public-team-name {
        font-size: 1.05rem;
    }

    .xup-public-team[open] > .xup-public-team-trigger .xup-public-team-name {
        font-size: 1.12rem;
    }

    .xup-public-row-meta {
        font-size: 0.76rem;
    }

    .xup-public-member {
        padding: 0.3rem 0.4rem;
    }

    .xup-public-member-name {
        font-size: 0.9rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .xup-public-chevron,
    .xup-public-embed-link,
    .xup-public-team-panel {
        transition: none;
    }

    .xup-public-embed-link:hover {
        box-shadow: none;
    }

    .xup-public-lightbox.is-instant {
        transition: none;
    }
}

body.page-public a:focus-visible,
body.page-public summary:focus-visible,
body.page-public button:focus-visible {
    outline: 2px solid var(--xup-public-focus);
    outline-offset: 2px;
}

/* —— Portable public profile: theme, columns, demo —— */
html.xup-public-theme-dark,
html.xup-embed-root.xup-public-theme-dark {
    color-scheme: dark;
    background: #12181f;
}

body.xup-public-theme-dark,
html.xup-public-theme-dark body.page-public {
    --xup-teams-surface: #1b242e;
    --xup-teams-surface-muted: #222c38;
    --xup-teams-text: #e8eef4;
    --xup-teams-text-muted: #a7b4c2;
    --xup-teams-border: #334152;
    --xup-public-bg: #12181f;
    --xup-public-bg-accent: #182028;
    --xup-public-surface: #1b242e;
    --xup-public-surface-raised: #222c38;
    --xup-public-surface-soft: #222c38;
    --xup-public-row: #1b242e;
    --xup-public-panel: #181f28;
    --xup-public-block: #222c38;
    --xup-public-text: #e8eef4;
    --xup-public-muted: #a7b4c2;
    --xup-public-line: #334152;
    --xup-public-divider: #2a3542;
    --xup-public-caption-bg: #222c38;
    --xup-public-caption-text: #dce4ec;
    --xup-public-media-frame-bg: #1b242e;
    --xup-public-media-surface: #1b242e;
    --xup-public-member-bg: #222c38;
    --xup-public-member-border: #334152;
    --xup-public-accent-soft: rgba(90, 159, 192, 0.18);
    --xup-public-focus: #6a9bb0;
    --xup-public-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    --xup-public-crown-gold: #e0c35a;
    --xup-public-crown-silver: #c0c8d2;
    color: var(--xup-public-text);
    background:
        radial-gradient(ellipse 48% 42% at 0% 8%, rgba(90, 159, 192, 0.11) 0%, transparent 72%),
        radial-gradient(ellipse 48% 42% at 100% 8%, rgba(90, 159, 192, 0.09) 0%, transparent 72%),
        linear-gradient(180deg, var(--xup-public-bg-accent), var(--xup-public-bg));
}

body.xup-public-theme-dark .brand,
body.xup-public-theme-dark .brand-surface,
body.xup-public-theme-dark .brand-link {
    color: var(--xup-public-text);
}

body.xup-public-theme-dark .brand-surface {
    background: rgba(34, 44, 56, 0.92);
    border-color: rgba(232, 238, 244, 0.14);
    box-shadow: none;
}

body.xup-public-theme-dark .site-header-version,
body.xup-public-theme-dark .meta,
body.xup-public-theme-dark .site-footer,
body.xup-public-theme-dark .site-footer p,
body.xup-public-theme-dark .xup-public-lead {
    color: var(--xup-public-muted);
}

body.xup-public-theme-dark .xup-public-hero h1,
body.xup-public-theme-dark .xup-public-notfound h1,
body.xup-public-theme-dark .xup-public-team-name,
body.xup-public-theme-dark .xup-public-section-title,
body.xup-public-theme-dark .xup-public-embed-name,
body.xup-public-theme-dark .xup-public-embed-heading,
body.xup-public-theme-dark .xup-public-member-name,
body.xup-public-theme-dark .xup-public-member-name-text {
    color: var(--xup-public-text);
}

body.xup-public-theme-dark .xup-public-team {
    background: var(--xup-public-row);
    border-color: var(--xup-public-line);
    box-shadow: none;
}

body.xup-public-theme-dark .xup-public-team-trigger,
body.xup-public-theme-dark .xup-public-team[open] > .xup-public-team-trigger {
    background: var(--xup-public-row);
    color: var(--xup-public-text);
}

body.xup-public-theme-dark .xup-public-team-panel,
body.xup-public-theme-dark .xup-public-team-panel-body {
    background: var(--xup-public-panel);
    color: var(--xup-public-text);
}

body.xup-public-theme-dark .xup-public-block,
body.xup-public-theme-dark .xup-public-facts,
body.xup-public-theme-dark .xup-public-member-list,
body.xup-public-theme-dark .xup-public-member,
body.xup-public-theme-dark .xup-public-figure,
body.xup-public-theme-dark .xup-public-image-frame {
    background: var(--xup-public-block);
    border-color: var(--xup-public-line);
    color: var(--xup-public-text);
}

body.xup-public-theme-dark .xup-public-fact dt,
body.xup-public-theme-dark .xup-public-row-meta,
body.xup-public-theme-dark .xup-public-row-meta-text,
body.xup-public-theme-dark .xup-public-member-role,
body.xup-public-theme-dark .xup-public-empty,
body.xup-public-theme-dark .xup-public-empty-panel {
    color: var(--xup-public-muted);
}

body.xup-public-theme-dark .xup-public-figcaption {
    background: var(--xup-public-caption-bg);
    color: var(--xup-public-caption-text);
    border-top-color: var(--xup-public-divider);
}

body.xup-public-theme-dark .xup-public-fact {
    border-bottom-color: var(--xup-public-divider);
}

body.xup-public-theme-dark .xup-public-member {
    background: var(--xup-public-member-bg);
    border-color: var(--xup-public-member-border);
}

body.xup-public-theme-dark .xup-public-figure-preview,
body.xup-public-theme-dark .xup-public-image-frame {
    background: var(--xup-public-media-surface);
    border-color: var(--xup-public-line);
}

body.xup-public-theme-dark .xup-public-image-frame {
    background: var(--xup-public-media-frame-bg);
}

body.xup-public-theme-dark .xup-public-fact dd,
body.xup-public-theme-dark .xup-public-intro-text {
    color: var(--xup-public-text);
}

body.xup-public-theme-dark .xup-public-empty {
    background: var(--xup-public-surface);
    border-color: var(--xup-public-line);
}

body.xup-public-theme-dark .xup-public-logo,
body.xup-public-theme-dark .xup-public-logo-placeholder {
    background: var(--xup-public-surface-raised);
    border-color: var(--xup-public-line);
}

body.xup-public-theme-dark .xup-public-chevron {
    border-color: var(--xup-public-muted);
}

body.xup-public-theme-dark .xup-public-link,
body.xup-public-theme-dark .xup-public-back-link {
    color: var(--xup-public-accent);
}

body.xup-public-theme-dark .xup-public-embed-link {
    background: var(--xup-public-surface);
    border-color: var(--xup-public-line);
    color: var(--xup-public-text);
    box-shadow: none;
}

body.xup-public-theme-dark .xup-public-embed-link:hover {
    background: var(--xup-public-surface-raised);
    border-color: var(--xup-public-focus);
}

body.xup-embed-theme-dark {
    --xup-public-bg: #12181f;
    --xup-public-bg-accent: #12181f;
    --xup-public-surface: #1b242e;
    --xup-public-surface-soft: #222c38;
    --xup-public-surface-raised: #222c38;
    --xup-public-text: #e8eef4;
    --xup-public-muted: #a7b4c2;
    --xup-public-line: #334152;
    --xup-public-focus: #6a9bb0;
    --xup-public-shadow: none;
    background: var(--xup-public-bg);
    color: var(--xup-public-text);
}

body.xup-embed-theme-dark .xup-public-embed-link {
    background: var(--xup-public-surface);
    border-color: var(--xup-public-line);
    color: var(--xup-public-text);
}

body.xup-embed-theme-dark .xup-public-embed-link:hover {
    border-color: var(--xup-public-focus);
    background: var(--xup-public-surface-raised);
}

body.xup-embed-theme-dark .xup-public-embed-name,
body.xup-embed-theme-dark .xup-public-embed-heading {
    color: var(--xup-public-text);
}

body.xup-public-theme-dark.page-public-embed,
body.xup-embed-theme-dark.page-public-embed {
    background-image: none;
    background: var(--xup-public-bg);
}

body.xup-embed-cols-1 { --xup-embed-columns: 1; }
body.xup-embed-cols-2 { --xup-embed-columns: 2; }
body.xup-embed-cols-3 { --xup-embed-columns: 3; }
body.xup-embed-cols-4 { --xup-embed-columns: 4; }

body.xup-embed-spacing-compact {
    --xup-embed-card-padding: 0.4rem;
    --xup-embed-gap: 0.45rem;
}

body.xup-embed-spacing-normal {
    --xup-embed-gap: 0.7rem;
}

.xup-public-embed-heading {
    margin: 0 0 0.85rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--xup-public-text);
}

.xup-public-back-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--xup-public-accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.xup-public-back-link:hover {
    border-bottom-color: currentColor;
}

.xup-public-back-link:focus-visible {
    outline: 2px solid var(--xup-public-focus);
    outline-offset: 2px;
}

.xup-public-demo-notice {
    margin: 0.85rem 0 0;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--xup-public-line);
    border-radius: var(--xup-public-radius);
    background: var(--xup-public-accent-soft);
    color: var(--xup-public-text);
}

.xup-public-demo-notice p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.xup-public-demo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.xup-public-demo-card {
    margin: 0;
    padding: 1rem;
    border: 1px solid var(--xup-public-line);
    border-radius: var(--xup-public-radius);
    background: var(--xup-public-surface);
}

.xup-public-demo-card h2 {
    margin: 0 0 0.45rem;
    font-size: 1.05rem;
    color: var(--xup-public-text);
}

.xup-public-demo-card p {
    margin: 0 0 0.55rem;
    color: var(--xup-public-muted);
    font-size: 0.92rem;
}

.xup-public-demo-hint {
    font-size: 0.82rem !important;
}

.xup-public-demo-preview {
    margin: 1.25rem 0;
}

.xup-public-demo-preview h2 {
    margin: 0 0 0.65rem;
    font-size: 1.05rem;
    color: var(--xup-public-text);
}

.xup-public-demo-frame {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 280px;
    height: 320px;
    border: 1px solid var(--xup-public-line);
    border-radius: var(--xup-public-radius);
    background: var(--xup-public-surface-soft);
}

.xup-public-demo-meta {
    margin: 1rem 0 0;
    color: var(--xup-public-muted);
    font-size: 0.82rem;
}

.xup-public-link {
    color: var(--xup-public-accent);
    font-weight: 600;
}

.xup-public-link:focus-visible {
    outline: 2px solid var(--xup-public-focus);
    outline-offset: 2px;
}

@media (max-width: 1023px) {
    body.xup-embed-size-standard .xup-public-embed-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.xup-embed-cols-1.xup-embed-size-standard .xup-public-embed-grid {
        grid-template-columns: 1fr;
    }

    .xup-public-demo-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    body.xup-embed-size-standard .xup-public-embed-grid {
        grid-template-columns: 1fr;
    }

    body.xup-embed-cols-2.xup-embed-size-standard .xup-public-embed-grid,
    body.xup-embed-cols-3.xup-embed-size-standard .xup-public-embed-grid,
    body.xup-embed-cols-4.xup-embed-size-standard .xup-public-embed-grid {
        grid-template-columns: 1fr;
    }
}

