/* PokeTeamOn M7.1 — additive publisher/task navigation only. */

.publisher-task-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px 16px;
}

.publisher-task-nav a,
.publisher-mobile-nav a,
.publisher-footer-nav a {
    white-space: nowrap;
}

.publisher-footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
}

@media (max-width: 900px) and (min-width: 601px) {
    .publisher-task-nav {
        gap: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 600px) {
    .publisher-footer-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 16px;
    }
}

/* M7.1 human correction R2 — homepage workflow links. */
.m71-workflow-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
}

.m71-workflow-links a {
    color: inherit;
    text-decoration: none;
}

.m71-workflow-links a:hover,
.m71-workflow-links a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 600px) {
    .m71-workflow-links {
        gap: 3px 5px;
    }
}

/* ==========================================================
   PokeTeamOn M7.1 Human Correction R3 V2
   Mobile hero hierarchy + signal alignment
   ========================================================== */

/*
 * The workflow navigation is intentionally actionable, but it must read as a
 * separate navigation row rather than as the first line of the H1.
 */
.m71-workflow-links {
    margin: 0 0 1.15rem !important;
    padding-bottom: 0.15rem;
    line-height: 1.55;
}

/*
 * Existing homepage value signals must form a stable, readable list on
 * narrow screens. This replaces the loose wrap that visually detached
 * checkmarks from their labels.
 */
.hero-notes {
    margin-top: 1.35rem !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.65rem !important;
    align-items: start !important;
    justify-items: stretch !important;
}

.hero-notes > span {
    position: static !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.55rem !important;
    line-height: 1.4 !important;
    text-align: left !important;
    transform: none !important;
}

/* Keep any existing checkmark pseudo-element attached to its own label. */
.hero-notes > span::before {
    position: static !important;
    inset: auto !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    transform: none !important;
}

@media (min-width: 601px) {
    .m71-workflow-links {
        margin-bottom: 1.35rem !important;
    }

    .hero-notes {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 0.75rem 1rem !important;
    }
}

/* ==========================================================
   PokeTeamOn M7.1 Human Correction R5
   Live team preview + local sprite presentation
   ========================================================== */

.team-grid[data-team-preview-state] .team-slot {
    min-width: 0;
}

.team-grid[data-team-preview-state] .slot-orb {
    display: grid;
    place-items: center;
    overflow: hidden;
}

.team-grid[data-team-preview-state] .slot-orb.pt-has-sprite {
    border-style: solid;
    background:
        radial-gradient(circle at 50% 45%, #ffffff 0, #f7f9ff 62%, #eef3ff 100%);
}

.pt-preview-sprite {
    display: block;
    width: 88px;
    height: 88px;
    max-width: 100%;
    object-fit: contain;
    image-rendering: auto;
}

.pt-preview-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.pt-preview-actions .button {
    text-align: center;
}

.pt-preview-note {
    flex-basis: 100%;
    margin: 0.15rem 0 0;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.5;
}

.team-slot.pt-preview-empty .slot-orb {
    opacity: 0.62;
}

@media (max-width: 600px) {
    .pt-preview-sprite {
        width: 82px;
        height: 82px;
    }

    .pt-preview-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .pt-preview-actions .button {
        width: 100%;
    }
}

/* M7.1 R5 V3 — stable sprite dimensions and deferred visual work. */
.team-grid[data-team-preview-state] {
    content-visibility: auto;
    contain-intrinsic-size: 720px;
}

.pt-preview-sprite {
    aspect-ratio: 1 / 1;
}

/* ==========================================================
   PokeTeamOn M7.1 Human Correction R6
   Warm ivory page canvas inspired by the supplied reference.
   Reference dominant background ≈ rgb(243, 240, 225) / #f3f0e1.
   ========================================================== */

:root {
    --m71-warm-page: #f3f0e1;
    --m71-warm-header: #f8f5ea;
    --m71-warm-footer: #efecdf;
    --m71-warm-line: rgba(104, 94, 65, 0.16);
}

html,
body {
    background-color: var(--m71-warm-page) !important;
}

body {
    background-image:
        linear-gradient(
            180deg,
            var(--m71-warm-header) 0,
            var(--m71-warm-page) 30rem,
            var(--m71-warm-page) 100%
        ) !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
}

/*
 * Keep content surfaces/cards white. The contrast between a warm page canvas
 * and clean white cards is intentional and matches the visual direction of
 * the supplied reference without copying its component design.
 */
main {
    background: transparent !important;
}

.site-header {
    background: rgba(248, 245, 234, 0.96) !important;
    border-bottom-color: var(--m71-warm-line) !important;
}

.site-footer {
    background: var(--m71-warm-footer) !important;
    border-top-color: var(--m71-warm-line) !important;
}

/*
 * Preserve white cards and panels as foreground surfaces.
 * These selectors only reinforce already-card-like surfaces; they do not
 * alter layout, typography, or application behavior.
 */
.team-slot,
.feature-card,
.method-card,
.hero-card,
.m45-card,
.panel {
    background-color: #fff;
}

@media (prefers-reduced-transparency: reduce) {
    .site-header {
        background: var(--m71-warm-header) !important;
    }
}
