/*
 * Feedus AI page (spec 11.2), drawn by public/player/feedus-page.js.
 * Sizes come from --fpg-* variables in pixels of the page's own size; the
 * page is scaled to its area with --fp-scale.
 */
.fpg {
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
    transform-origin: 0 0;
    transform: scale(var(--fp-scale, 1));
    font-family: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.25;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Fonts are set by feedus-page.js: the body font on .fpg, the headline font in variables. */

.fpg-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fpg-dim {
    position: absolute;
    inset: 0;
}

.fpg-logo {
    position: absolute;
    top: 4%;
    right: 4%;
    max-width: 18%;
    max-height: 12%;
    object-fit: contain;
    display: block;
}

.fpg-text {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
}

.fpg-content {
    max-width: 100%;
    box-sizing: border-box;
}

.fpg-content.has-panel {
    padding: calc(var(--fpg-unit) * 4) calc(var(--fpg-unit) * 5);
    border-radius: calc(var(--fpg-unit) * 2);
}

.fpg-headline {
    font-size: var(--fpg-headline);
    font-family: var(--fpg-headline-font, inherit);
    font-weight: var(--fpg-headline-weight, 700);
    line-height: 1.08;
    overflow-wrap: break-word;
    hyphens: manual;
}


.fpg-rule {
    width: calc(var(--fpg-unit) * 12);
    height: calc(var(--fpg-unit) * 0.8);
    margin: calc(var(--fpg-unit) * 2.4) 0;
    border-radius: calc(var(--fpg-unit) * 0.4);
    background: var(--fpg-accent);
}

.fpg-body {
    font-size: var(--fpg-body);
}

.fpg-line + .fpg-line {
    margin-top: 0.3em;
}

.fpg-footer {
    margin-top: 1.4em;
    font-size: var(--fpg-footer);
    opacity: 0.85;
}

/* Centered */
.fpg-l-centered .fpg-text { left: 12%; right: 12%; top: 14%; bottom: 14%; text-align: center; align-items: center; }
.fpg-l-centered .fpg-rule { margin-left: auto; margin-right: auto; }
.fpg-l-centered.has-logo .fpg-text { top: 18%; }

/* Big headline */
.fpg-l-headline .fpg-text { left: 7%; right: 30%; top: 9%; bottom: 9%; justify-content: flex-start; }
.fpg-l-headline.is-portrait .fpg-text { right: 8%; bottom: 30%; }
.fpg-l-headline.has-logo .fpg-text { top: 16%; }

/* Text column */
.fpg-l-split .fpg-text { left: 6%; width: 46%; top: 10%; bottom: 10%; }
.fpg-l-split.is-portrait .fpg-text { left: 8%; right: 8%; width: auto; top: 7%; bottom: 45%; }
.fpg-l-split.is-portrait.has-logo .fpg-text { top: 16%; }

/* List */
.fpg-l-list .fpg-text { left: 8%; right: 8%; top: 8%; bottom: 8%; justify-content: flex-start; }
.fpg-l-list.has-logo .fpg-text { top: 16%; }
.fpg-row {
    display: flex;
    align-items: baseline;
    gap: 1em;
    padding: 0.35em 0;
    border-bottom: calc(var(--fpg-unit) * 0.15) solid var(--fpg-accent);
}
.fpg-row:last-child { border-bottom: 0; }
.fpg-row-name { flex: 1 1 auto; min-width: 0; overflow-wrap: break-word; }
.fpg-row-value { flex: 0 0 auto; font-weight: 700; color: var(--fpg-accent); }

/* Text layer over an image or video (spec 5.4): transparent, above the media. */
.fpg-overlay { background: transparent; pointer-events: none; }
.fpg-overlay .fpg-text { left: 6%; right: 6%; top: 6%; bottom: 6%; }
.fpg-overlay.has-shadow .fpg-content { text-shadow: 0 0.06em 0.3em rgba(0, 0, 0, 0.75), 0 0 0.08em rgba(0, 0, 0, 0.6); }
.fpg-overlay .fpg-headline + .fpg-body { margin-top: 0.4em; }
.fp-overlay-box { position: absolute; inset: 0; }
.fp-overlay-box > .fp-media-inner { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
