/* Phase 4 – Round 4 inner-page unification
 * Scope: region archives, profile pages, and structured virtual pages.
 * Goal: align inner pages with the warm editorial system introduced in Round 2
 * and the rebuilt homepage introduced in Round 3.
 */

.page-shell,
.page-market-archive,
.page-profile {
    max-width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    gap: clamp(20px, 2.8vw, 30px);
    padding: clamp(18px, 2.4vw, 28px) 0 84px;
}

.page-shell .site-section__inner,
.page-market-archive .site-section__inner,
.page-profile .site-section__inner,
.page-shell .site-block,
.page-market-archive .site-block,
.page-profile .site-block {
    display: grid;
    gap: 18px;
    padding: clamp(22px, 2.8vw, 32px);
    border-radius: 32px;
    border: 1px solid color-mix(in srgb, var(--site-line) 70%, white);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,252,248,0.98)),
        radial-gradient(circle at top right, rgba(124,139,122,0.08), transparent 36%);
    box-shadow: 0 22px 52px rgba(40, 45, 38, 0.08);
}

.page-shell .site-card,
.page-market-archive .site-card,
.page-profile .site-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,251,246,0.98));
    border: 1px solid rgba(122, 134, 123, 0.14);
    border-radius: 24px;
    box-shadow: 0 14px 30px rgba(34, 39, 34, 0.06);
}

.page-shell .site-breadcrumb,
.page-market-archive .site-breadcrumb,
.page-profile .site-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(122, 134, 123, 0.12);
    color: var(--site-copy-muted);
    font-size: 12px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.page-shell .site-breadcrumb a,
.page-market-archive .site-breadcrumb a,
.page-profile .site-breadcrumb a {
    color: var(--site-copy);
    text-decoration: none;
}

.page-shell .site-breadcrumb a:hover,
.page-market-archive .site-breadcrumb a:hover,
.page-profile .site-breadcrumb a:hover {
    color: var(--site-accent-strong);
}

.page-shell .site-section__eyebrow,
.page-market-archive .site-section__eyebrow,
.page-profile .site-section__eyebrow,
.page-shell .site-card__eyebrow,
.page-market-archive .site-card__eyebrow,
.page-profile .site-card__eyebrow,
.page-shell .site-link-card__meta,
.page-market-archive .site-link-card__meta,
.page-profile .site-link-card__meta {
    color: var(--site-accent-strong);
    letter-spacing: 0.12em;
}

.page-shell .site-section__title,
.page-market-archive .site-section__title,
.page-profile .site-section__title,
.page-shell .site-card__title,
.page-market-archive .site-card__title,
.page-profile .site-card__title {
    color: var(--site-ink);
}

.page-shell .site-section__intro,
.page-market-archive .site-section__intro,
.page-profile .site-section__intro,
.page-shell .site-card__text,
.page-market-archive .site-card__text,
.page-profile .site-card__text {
    color: var(--site-copy);
}

.page-shell .site-pill,
.page-market-archive .site-pill,
.page-profile .site-pill,
.page-shell .site-chip,
.page-market-archive .site-chip,
.page-profile .site-chip,
.page-shell .site-badge,
.page-market-archive .site-badge,
.page-profile .site-badge {
    border-color: rgba(122, 134, 123, 0.18);
    background: rgba(124, 139, 122, 0.08);
    color: var(--site-ink);
}

.page-shell .site-pill--active,
.page-market-archive .site-pill--active,
.page-profile .site-pill--active,
.page-shell .site-badge--active,
.page-market-archive .site-badge--active,
.page-profile .site-badge--active,
.page-shell .site-chip--accent,
.page-market-archive .site-chip--accent,
.page-profile .site-chip--accent {
    background: linear-gradient(180deg, rgba(124, 139, 122, 0.20), rgba(124, 139, 122, 0.14));
    border-color: rgba(124, 139, 122, 0.32);
    color: var(--site-accent-strong);
}

.page-shell .site-btn--ghost,
.page-market-archive .site-btn--ghost,
.page-profile .site-btn--ghost {
    background: rgba(255, 252, 248, 0.84);
    border-color: rgba(122, 134, 123, 0.16);
    color: var(--site-ink);
}

.page-shell .site-btn--ghost:hover,
.page-market-archive .site-btn--ghost:hover,
.page-profile .site-btn--ghost:hover {
    border-color: rgba(122, 134, 123, 0.30);
    background: rgba(255, 252, 248, 0.98);
}

.page-shell .page-masthead__grid,
.page-market-archive .page-market-hero,
.page-market-archive .page-market-toolbar,
.page-profile .site-profile-hero,
.page-profile .page-profile-layout {
    gap: clamp(18px, 2vw, 24px);
}

.page-shell .page-masthead__main,
.page-shell .page-masthead__side,
.page-market-archive .page-market-hero__main,
.page-market-archive .page-market-hero__aside,
.page-market-archive .page-market-toolbar__status,
.page-market-archive .page-market-toolbar__support,
.page-market-archive .page-market-toolbar__filters,
.page-market-archive .page-market-toolbar__sort,
.page-profile .site-profile-hero__media-card,
.page-profile .site-profile-hero__info-card,
.page-profile .page-profile-rail,
.page-profile .site-profile-section-card {
    position: relative;
    overflow: hidden;
}

.page-shell .page-masthead__main::before,
.page-market-archive .page-market-hero__main::before,
.page-profile .site-profile-hero__info-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(124, 139, 122, 0.12), transparent 40%);
    pointer-events: none;
}

.page-shell .page-masthead__pills,
.page-market-archive .page-masthead__pills,
.page-profile .site-profile-hero__topline,
.page-profile .site-profile-hero__location-row,
.page-profile .site-profile-hero__actions,
.page-profile .page-profile-rail__links,
.page-profile .page-profile-rail__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.page-market-archive .page-market-hero__media,
.page-market-archive .site-photo-card__media,
.page-profile .site-profile-hero__main-image,
.page-profile .site-gallery-grid__item,
.page-shell .site-profile-spotlight__media,
.page-shell .site-area-spotlight__media {
    overflow: hidden;
    border-radius: 22px;
    background: rgba(240, 236, 229, 0.9);
    box-shadow: inset 0 0 0 1px rgba(122, 134, 123, 0.08);
}

.page-market-archive .page-market-hero__media img,
.page-market-archive .site-photo-card__media img,
.page-profile .site-profile-hero__main-image img,
.page-profile .site-gallery-grid__item img,
.page-shell .site-profile-spotlight__media img,
.page-shell .site-area-spotlight__media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .55s ease;
}

.page-market-archive .site-photo-card:hover .site-photo-card__media img,
.page-profile .page-profile-related-card:hover .page-profile-related-card__media img,
.page-profile .site-profile-hero__thumb:hover img,
.page-shell .site-profile-spotlight:hover .site-profile-spotlight__media img,
.page-shell .site-area-spotlight:hover .site-area-spotlight__media img {
    transform: scale(1.04);
}

.page-market-archive .site-photo-card__body,
.page-profile .page-profile-related-card__body,
.page-shell .site-link-card,
.page-shell .site-info-card,
.page-shell .site-step-card,
.page-shell .site-area-spotlight,
.page-shell .site-profile-spotlight {
    padding: 20px;
}

.page-market-archive .site-photo-card--compare,
.page-profile .page-profile-related-card,
.page-shell .site-link-card,
.page-shell .site-area-spotlight,
.page-shell .site-profile-spotlight {
    overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.page-market-archive .site-photo-card--compare:hover,
.page-profile .page-profile-related-card:hover,
.page-shell .site-link-card:hover,
.page-shell .site-area-spotlight:hover,
.page-shell .site-profile-spotlight:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 36px rgba(36, 41, 37, 0.11);
    border-color: rgba(124, 139, 122, 0.22);
}

.page-market-archive .site-photo-card__name,
.page-profile .site-sticky-wa__name,
.page-profile .site-profile-hero__status,
.page-profile .site-profile-hero__stat-value,
.page-profile .site-profile-fact-grid__item strong,
.page-shell .site-step-card h3 {
    color: var(--site-ink);
}

.page-market-archive .site-photo-card__summary,
.page-market-archive .site-photo-card__meta,
.page-profile .site-sticky-wa__hint,
.page-profile .site-sticky-wa__meta,
.page-profile .site-profile-hero__microcopy,
.page-profile .site-profile-fact-grid__item,
.page-shell .site-faq-item__answer,
.page-shell .site-list--check li {
    color: var(--site-copy);
}

.page-market-archive .site-photo-card__compare-item,
.page-profile .site-profile-hero__stat,
.page-profile .site-profile-fact-grid__item,
.page-profile .site-sticky-wa,
.page-shell .site-faq-item--toggle,
.page-shell .site-step-card,
.page-shell .site-info-card,
.page-shell .site-compare-card {
    border-radius: 20px;
    border: 1px solid rgba(122, 134, 123, 0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(249,245,239,0.96));
    box-shadow: none;
}

.page-profile .site-profile-hero__status {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(122, 134, 123, 0.20);
    background: rgba(124, 139, 122, 0.10);
    color: var(--site-accent-strong);
    font-size: 13px;
    font-weight: 700;
}

.page-profile .site-profile-hero__stats,
.page-profile .site-profile-fact-grid,
.page-market-archive .region-grid,
.page-shell .site-grid-4,
.page-shell .site-grid-steps,
.page-shell .site-grid-compare,
.page-profile .page-profile-related-grid {
    gap: 16px;
}

.page-profile .site-profile-hero__thumb {
    overflow: hidden;
    padding: 0;
    border-radius: 16px;
    border: 1px solid rgba(122, 134, 123, 0.14);
    background: rgba(255, 252, 248, 0.9);
    cursor: pointer;
}

.page-profile .site-profile-hero__thumb.is-active {
    border-color: rgba(124, 139, 122, 0.34);
    box-shadow: 0 0 0 1px rgba(124, 139, 122, 0.12);
}

.page-profile .site-sticky-wa {
    position: sticky;
    bottom: 24px;
    z-index: 6;
    padding: 18px;
    background:
        linear-gradient(180deg, rgba(255,252,248,0.96), rgba(248,243,236,0.98)),
        radial-gradient(circle at top right, rgba(124,139,122,0.08), transparent 40%);
    box-shadow: 0 20px 40px rgba(37, 41, 36, 0.12);
}

.page-market-archive .page-final-cta,
.page-shell .site-cta {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.92), rgba(249,245,239,0.98)),
        radial-gradient(circle at top right, rgba(183,157,122,0.10), transparent 42%);
    border: 1px solid rgba(122, 134, 123, 0.12);
    box-shadow: 0 18px 42px rgba(34, 39, 34, 0.08);
}

.page-shell .site-faq-item--toggle summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 20px;
    color: var(--site-ink);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-shell .site-faq-item--toggle summary::after {
    content: "+";
    color: var(--site-accent-strong);
    font-size: 18px;
    font-weight: 700;
}

.page-shell .site-faq-item--toggle[open] summary::after {
    content: "–";
}

.page-shell .site-faq-item__answer {
    padding: 0 20px 18px;
}

.page-shell .site-list--check li::before {
    color: var(--site-accent-strong);
}

@media (max-width: 1080px) {
    .page-market-archive .region-grid,
    .page-shell .site-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .page-shell,
    .page-market-archive,
    .page-profile {
        max-width: min(100% - 20px, 960px);
        padding-bottom: 72px;
    }

    .page-shell .page-masthead__grid,
    .page-market-archive .page-market-hero,
    .page-market-archive .page-market-toolbar,
    .page-profile .site-profile-hero,
    .page-profile .page-profile-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 680px) {
    .page-market-archive .region-grid,
    .page-shell .site-grid-4,
    .page-shell .site-grid-steps,
    .page-shell .site-grid-compare,
    .page-profile .page-profile-related-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .page-profile .site-profile-hero__thumbs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .page-profile .site-profile-hero__stats,
    .page-profile .site-profile-fact-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
