/* ==================================================================
   MADHAV FLOWER DECOR — INTERNAL PAGES
   Loaded only where needed, via $page_styles in header.php.

   1.  Page Banner
   2.  Breadcrumb
   3.  Filters
   4.  Lightbox
   5.  About — story, mission, journey, team, certificates
   6.  Decoration Detail
   7.  Rental Packages
   8.  Projects
   9.  Blog — listing, search, pagination
   10. Blog — article, TOC, prose, share
   11. Contact — info, form, map
   12. FAQ Accordion
   13. Legal Prose
   14. 404
   15. Responsive
   ================================================================== */

/* ------------------------------------------------------------------
   1. PAGE BANNER
   ------------------------------------------------------------------ */
.page-banner {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    min-height: clamp(380px, 46vh, 560px);
    padding-top: var(--header-h);
    overflow: hidden;
    text-align: center;
}

.page-banner__media { position: absolute; inset: 0; z-index: -2; }
.page-banner__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: hero-zoom 30s var(--ease) infinite alternate;
}

.page-banner__overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(10, 22, 14, 0.72), rgba(10, 22, 14, 0.6)),
        radial-gradient(ellipse at 50% 45%, transparent 25%, rgba(10, 22, 14, 0.55) 100%);
}

.page-banner__inner {
    padding-block: clamp(2.5rem, 5vw, 4rem);
    color: rgba(255, 255, 255, 0.76);
}
.page-banner .eyebrow { color: var(--c-gold); }

.page-banner__title {
    margin-block: 1.25rem 1.15rem;
    font-size: clamp(2.25rem, 1.3rem + 3.9vw, 4.5rem);
    color: var(--c-white);
}
.page-banner__title .accent { color: var(--c-gold); }

.page-banner__subtitle {
    max-width: 620px;
    margin-inline: auto;
    font-size: var(--fs-lead);
    color: rgba(255, 255, 255, 0.74);
}

/* ------------------------------------------------------------------
   2. BREADCRUMB
   ------------------------------------------------------------------ */
.breadcrumb { margin-top: 2rem; }

.breadcrumb__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.76rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.breadcrumb__item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: rgba(255, 255, 255, 0.55);
}
.breadcrumb__item a {
    color: rgba(255, 255, 255, 0.72);
    transition: color var(--t-fast) var(--ease);
}
.breadcrumb__item a:hover { color: var(--c-gold); }
.breadcrumb__item [aria-current] { color: var(--c-gold); }

/* Gold diamond separator, matching the hero occasion pills. */
.breadcrumb__sep {
    width: 4px;
    height: 4px;
    background: var(--c-gold);
    opacity: 0.6;
    transform: rotate(45deg);
}

/* ------------------------------------------------------------------
   3. FILTERS
   ------------------------------------------------------------------ */
.filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: clamp(2rem, 3.5vw, 3.25rem);
}

.filters__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 1.35rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--c-grey-line);
    background: var(--c-white);
    font-size: 0.76rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-body);
    transition: all var(--t-fast) var(--ease);
}
.filters__btn:hover {
    border-color: var(--c-gold);
    color: var(--c-gold-deep);
    transform: translateY(-2px);
}
.filters__btn.is-active {
    background: var(--c-green);
    border-color: var(--c-green);
    color: var(--c-white);
}

.filters__count {
    display: grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding-inline: 0.35rem;
    border-radius: var(--radius-pill);
    background: var(--c-beige-soft);
    font-size: 0.65rem;
    color: var(--c-gold-deep);
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.filters__btn.is-active .filters__count {
    background: rgba(255, 255, 255, 0.15);
    color: var(--c-gold);
}

/* A tile hidden by the filter must leave the grid, not just fade. */
.gallery__item[hidden],
.project-card[hidden],
.blog-card[hidden] { display: none !important; }

/* Shown when a filter yields nothing. */
.empty-state {
    padding: clamp(3rem, 6vw, 5rem) 1rem;
    text-align: center;
    color: var(--c-muted);
}
.empty-state h3 { margin-bottom: 0.75rem; }

/* ------------------------------------------------------------------
   4. LIGHTBOX
   ------------------------------------------------------------------ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    grid-template-columns: auto 1fr auto;
    place-items: center;
    gap: clamp(0.5rem, 2vw, 2rem);
    padding: clamp(1rem, 4vw, 3rem);
    background: rgba(8, 18, 12, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    transition: opacity var(--t-base) var(--ease);
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }

.lightbox__figure {
    grid-column: 2;
    display: grid;
    justify-items: center;
    gap: 1.25rem;
    max-width: 100%;
    max-height: 100%;
}

.lightbox__image {
    max-width: 100%;
    max-height: 76vh;
    width: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    /* Re-runs on every slide change; see pages.js. */
    animation: lightbox-in 0.45s var(--ease-out) both;
}

@keyframes lightbox-in {
    from { opacity: 0; scale: 0.96; }
    to   { opacity: 1; scale: 1;    }
}

.lightbox__caption {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.78);
    text-align: center;
}

.lightbox__close,
.lightbox__nav {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: var(--c-white);
    transition: all var(--t-fast) var(--ease);
}
.lightbox__close:hover,
.lightbox__nav:hover {
    background: var(--c-gold);
    border-color: var(--c-gold);
    color: var(--c-green);
}
.lightbox__close svg,
.lightbox__nav svg { width: 20px; height: 20px; }

.lightbox__close {
    position: absolute;
    top: clamp(1rem, 3vw, 2rem);
    right: clamp(1rem, 3vw, 2rem);
}
.lightbox__close:hover { transform: rotate(90deg); }

.lightbox__nav--prev { grid-column: 1; }
.lightbox__nav--prev svg { transform: rotate(180deg); }
.lightbox__nav--next { grid-column: 3; }

.lightbox__counter {
    position: absolute;
    bottom: clamp(1rem, 3vw, 2rem);
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.74rem;
    letter-spacing: 0.24em;
    color: rgba(255, 255, 255, 0.5);
}

/* ------------------------------------------------------------------
   5. ABOUT
   ------------------------------------------------------------------ */
.story__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(2.5rem, 6vw, 6rem);
}
.story__media {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.story__media img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    transition: transform var(--t-slow) var(--ease-out);
}
.story__media:hover img { transform: scale(1.05); }
.story__text > * + * { margin-top: 1.25rem; }
.story__text h2 { margin-bottom: 1.5rem; }

/* Mission & Vision — two glass cards */
.pillars__grid { grid-template-columns: repeat(2, 1fr); }

.pillar {
    position: relative;
    padding: clamp(2rem, 3vw, 3rem);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out);
}
.pillar:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.pillar::after {
    content: "";
    position: absolute;
    top: -40%;
    right: -30%;
    width: 60%;
    aspect-ratio: 1;
    background: radial-gradient(circle, var(--c-gold-glow), transparent 70%);
    opacity: 0.5;
    pointer-events: none;
}
.pillar__icon {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    margin-bottom: 1.5rem;
    border-radius: 16px;
    background: var(--c-green);
    color: var(--c-gold);
}
.pillar__icon svg { width: 26px; height: 26px; }
.pillar h3 { margin-bottom: 0.85rem; font-size: 1.6rem; }
.pillar p { position: relative; }

/* Journey — vertical timeline, alternating on desktop */
.journey { position: relative; }
.journey__list { position: relative; display: grid; gap: clamp(2rem, 3vw, 3rem); }

/* Centre rail. */
.journey__list::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--c-gold), transparent);
    opacity: 0.4;
    transform: translateX(-50%);
}

.journey__item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: clamp(1.5rem, 3vw, 3rem);
}

.journey__card {
    padding: clamp(1.5rem, 2.2vw, 2.25rem);
    border-radius: var(--radius);
    background: var(--c-white);
    border: 1px solid var(--c-grey-line);
    box-shadow: var(--shadow-sm);
    transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out);
}
.journey__card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.journey__card h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.journey__card p { font-size: 0.9rem; color: var(--c-muted); }

/* Odd items sit left of the rail, even items right. */
.journey__item:nth-child(odd)  .journey__card { grid-column: 1; text-align: right; }
.journey__item:nth-child(even) .journey__card { grid-column: 3; }

.journey__year {
    grid-column: 2;
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--c-green);
    border: 1px solid var(--c-gold);
    box-shadow: 0 0 0 8px var(--c-ivory);
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--c-gold);
}

/* Team */
.team__grid { grid-template-columns: repeat(3, 1fr); }

.team-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--c-white);
    box-shadow: var(--shadow-sm);
    transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out);
}
.team-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }

.team-card__media { position: relative; aspect-ratio: 1; overflow: hidden; }
.team-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1);
    transition: transform var(--t-slow) var(--ease-out), filter var(--t-base) var(--ease);
}
.team-card:hover .team-card__media img { transform: scale(1.06); filter: grayscale(0); }

.team-card__body { padding: 1.5rem 1.6rem 1.75rem; }
.team-card__body h3 { font-size: 1.3rem; margin-bottom: 0.2rem; }
.team-card__role {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--c-gold-deep);
}
.team-card__body p { font-size: 0.86rem; line-height: 1.7; color: var(--c-muted); }

/* Certificates */
.certs__grid { grid-template-columns: repeat(4, 1fr); }

.cert {
    display: grid;
    justify-items: center;
    gap: 0.4rem;
    padding: clamp(1.75rem, 2.4vw, 2.5rem) 1.25rem;
    text-align: center;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    transition: border-color var(--t-base) var(--ease), transform var(--t-base) var(--ease-out);
}
.cert:hover { border-color: var(--c-gold); transform: translateY(-5px); }
.cert__icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 0.85rem;
    border-radius: 50%;
    border: 1px solid var(--c-gold);
    color: var(--c-gold);
}
.cert__icon svg { width: 24px; height: 24px; }
.cert h3 { font-size: 1.15rem; color: var(--c-white); }
.cert__issuer { font-size: 0.8rem; color: rgba(255, 255, 255, 0.5); }
.cert__year {
    margin-top: 0.35rem;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--c-gold);
}

/* ------------------------------------------------------------------
   6. DECORATION DETAIL
   ------------------------------------------------------------------ */
.detail__layout {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: clamp(2.5rem, 5vw, 5rem);
    align-items: start;
}

/* Image gallery: one lead shot, three thumbnails. */
.detail__gallery { display: grid; gap: 1rem; }
.detail__lead {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.detail__lead img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform var(--t-slow) var(--ease-out);
}
.detail__lead:hover img { transform: scale(1.05); }

.detail__thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.detail__thumb {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--c-grey);
}
.detail__thumb img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    transition: transform var(--t-base) var(--ease-out);
}
.detail__thumb:hover img { transform: scale(1.08); }
.detail__thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(22, 48, 31, 0.35);
    opacity: 0;
    transition: opacity var(--t-base) var(--ease);
}
.detail__thumb:hover::after { opacity: 1; }

/* Specification panel */
.detail__panel {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
    padding: clamp(1.75rem, 2.6vw, 2.5rem);
    border-radius: var(--radius-lg);
    background: var(--c-white);
    border: 1px solid var(--c-grey-line);
    box-shadow: var(--shadow-sm);
}
.detail__panel h2 { font-size: 1.9rem; margin-bottom: 0.5rem; }

.detail__price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--c-grey-line);
}
.detail__price strong {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 400;
    color: var(--c-green);
}
.detail__price span { font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-muted); }

.detail__spec + .detail__spec { margin-top: 1.75rem; }
.detail__spec h3 {
    margin-bottom: 0.9rem;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--c-muted);
}

/* Colour swatches */
.swatches { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.swatch {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.9rem 0.45rem 0.45rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--c-grey-line);
    font-size: 0.8rem;
    color: var(--c-ink);
    transition: border-color var(--t-fast) var(--ease);
}
.swatch:hover { border-color: var(--c-gold); }
.swatch__dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* One modifier per key in the COLOURS map (includes/data.php). Keeping
   them here rather than in a style attribute is what lets the project
   hold the line on "no inline CSS". */
.swatch__dot--ivory    { background: #f4efe6; }
.swatch__dot--blush    { background: #e8c4c0; }
.swatch__dot--crimson  { background: #8c2f39; }
.swatch__dot--marigold { background: #e8a33d; }
.swatch__dot--gold     { background: #c0a062; }
.swatch__dot--emerald  { background: #1f5137; }
.swatch__dot--lavender { background: #b9a7cf; }
.swatch__dot--white    { background: #fbfbf9; }

/* Related decorations show three cards, not the full twelve-up grid. */
.categories__grid--related { grid-template-columns: repeat(3, 1fr); }

/* Size chips */
.sizes { display: grid; gap: 0.6rem; }
.size {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-sm);
    background: var(--c-grey);
    font-size: 0.86rem;
}
.size strong { font-weight: 500; color: var(--c-ink); }
.size span { font-size: 0.78rem; color: var(--c-muted); }

/* Availability badges */
.badges { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem 1.1rem;
    border-radius: var(--radius-pill);
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.badge svg { width: 15px; height: 15px; }
.badge--yes { background: rgba(31, 81, 55, 0.09); color: var(--c-green-mid); }
.badge--no  { background: var(--c-grey); color: var(--c-muted); text-decoration: line-through; }

.detail__actions { display: grid; gap: 0.75rem; margin-top: 2rem; }
.detail__actions .btn { width: 100%; }

.detail__prose > * + * { margin-top: 1.25rem; }

/* ------------------------------------------------------------------
   7. RENTAL PACKAGES
   ------------------------------------------------------------------ */
.packages__grid { grid-template-columns: repeat(3, 1fr); align-items: start; }

.package {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--c-white);
    border: 1px solid var(--c-grey-line);
    box-shadow: var(--shadow-sm);
    transition: transform var(--t-base) var(--ease-out),
                box-shadow var(--t-base) var(--ease-out),
                border-color var(--t-base) var(--ease);
}
.package:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

/* The recommended tier is lifted and gold-edged from the start. */
.package.is-popular {
    border-color: var(--c-gold);
    box-shadow: var(--shadow-gold);
}
.package__ribbon {
    position: absolute;
    z-index: 2;
    top: 1.25rem;
    right: 1.25rem;
    padding: 0.45rem 0.95rem;
    border-radius: var(--radius-pill);
    background: var(--c-gold);
    color: var(--c-white);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.package__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.package__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow) var(--ease-out);
}
.package:hover .package__media img { transform: scale(1.07); }
.package__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(22, 48, 31, 0.6));
}

.package__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: clamp(1.75rem, 2.4vw, 2.25rem);
}
.package__body h3 { font-size: 1.75rem; margin-bottom: 0.35rem; }
.package__tagline { font-size: 0.86rem; color: var(--c-muted); margin-bottom: 1.5rem; }

.package__price {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--c-grey-line);
}
.package__price strong {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 400;
    line-height: 1;
    color: var(--c-green);
}
.package__price span { font-size: 0.76rem; color: var(--c-muted); }

.package__meta {
    display: grid;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}
.package__meta div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.84rem;
}
.package__meta dt { color: var(--c-muted); }
.package__meta dd { margin: 0; color: var(--c-ink); text-align: right; }

.package__features {
    display: grid;
    gap: 0.7rem;
    margin-bottom: 2rem;
}
.package__features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.87rem;
    line-height: 1.6;
}
.package__features svg {
    flex: none;
    width: 16px;
    height: 16px;
    margin-top: 0.3rem;
    color: var(--c-gold);
}

.package__body .btn { margin-top: auto; width: 100%; }


/* ------------------------------------------------------------------
   9. BLOG LISTING
   ------------------------------------------------------------------ */
.blog__toolbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.75rem;
    margin-bottom: clamp(2.5rem, 4vw, 4rem);
}

.search {
    position: relative;
    width: min(520px, 100%);
}
.search input {
    width: 100%;
    padding: 1.05rem 3.25rem 1.05rem 1.5rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--c-grey-line);
    background: var(--c-white);
    font-size: 0.95rem;
    transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.search input::placeholder { color: var(--c-muted); }
.search input:focus {
    outline: none;
    border-color: var(--c-gold);
    box-shadow: 0 0 0 4px var(--c-gold-glow);
}
.search__icon {
    position: absolute;
    top: 50%;
    right: 1.4rem;
    width: 18px;
    height: 18px;
    color: var(--c-muted);
    transform: translateY(-50%);
    pointer-events: none;
}


/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: clamp(3rem, 5vw, 4.5rem);
}
.pagination__btn {
    display: grid;
    place-items: center;
    min-width: 46px;
    height: 46px;
    padding-inline: 0.75rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--c-grey-line);
    background: var(--c-white);
    font-size: 0.85rem;
    color: var(--c-body);
    transition: all var(--t-fast) var(--ease);
}
.pagination__btn:hover:not(:disabled) {
    border-color: var(--c-gold);
    color: var(--c-gold-deep);
    transform: translateY(-2px);
}
.pagination__btn[aria-current="true"] {
    background: var(--c-green);
    border-color: var(--c-green);
    color: var(--c-white);
}
.pagination__btn:disabled { opacity: 0.35; cursor: not-allowed; }
.pagination__btn svg { width: 16px; height: 16px; }
.pagination__btn--prev svg { transform: rotate(180deg); }

/* ------------------------------------------------------------------
   10. BLOG ARTICLE
   ------------------------------------------------------------------ */
.article__layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: clamp(2rem, 4vw, 4.5rem);
    align-items: start;
}

/* Table of contents, generated by pages.js from the headings. */
.toc {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
    padding: 1.75rem;
    border-radius: var(--radius);
    background: var(--c-white);
    border: 1px solid var(--c-grey-line);
}
.toc__title {
    margin-bottom: 1.1rem;
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--c-muted);
}
.toc__list { display: grid; gap: 0.15rem; }
.toc__list a {
    display: block;
    padding: 0.5rem 0 0.5rem 0.9rem;
    border-left: 2px solid var(--c-grey-line);
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--c-muted);
    transition: all var(--t-fast) var(--ease);
}
.toc__list a:hover { color: var(--c-ink); border-left-color: var(--c-gold); }
/* h3 entries nest under their h2. */
.toc__list a.is-sub { padding-left: 1.75rem; font-size: 0.8rem; }
/* Scroll-spy state, set by pages.js. */
.toc__list a.is-active {
    color: var(--c-gold-deep);
    border-left-color: var(--c-gold);
    background: linear-gradient(90deg, rgba(192, 160, 98, 0.08), transparent);
}

/* Prose */
.prose { max-width: 72ch; }
.prose > * + * { margin-top: 1.5rem; }
.prose p { font-size: 1.05rem; line-height: 1.9; }
.prose h2 {
    margin-top: 3rem;
    font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.35rem);
    /* Fixed header must not cover the heading when the TOC jumps to it. */
    scroll-margin-top: calc(var(--header-h) + 1.5rem);
}
.prose h3 {
    margin-top: 2.25rem;
    scroll-margin-top: calc(var(--header-h) + 1.5rem);
}
.prose ul { display: grid; gap: 0.75rem; }
.prose ul li {
    display: flex;
    gap: 0.9rem;
    font-size: 1rem;
    line-height: 1.8;
}
.prose ul li::before {
    content: "";
    flex: none;
    width: 6px;
    height: 6px;
    margin-top: 0.75rem;
    background: var(--c-gold);
    transform: rotate(45deg);
}

.prose blockquote {
    position: relative;
    margin-block: 2.5rem;
    padding: clamp(1.75rem, 2.6vw, 2.5rem) clamp(1.75rem, 2.6vw, 2.75rem);
    border-radius: var(--radius);
    background: var(--c-beige-soft);
    border-left: 3px solid var(--c-gold);
}
.prose blockquote p {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem);
    font-style: italic;
    line-height: 1.55;
    color: var(--c-ink);
}
.prose blockquote cite {
    display: block;
    margin-top: 1rem;
    font-family: var(--font-body);
    font-size: 0.76rem;
    font-style: normal;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-gold-deep);
}

.prose figure { margin-block: 2.5rem; }
.prose figure img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.prose figcaption {
    margin-top: 0.9rem;
    font-size: 0.8rem;
    text-align: center;
    color: var(--c-muted);
}

/* Article header */
.article__head { margin-bottom: clamp(2rem, 3vw, 3rem); }
.article__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--c-grey-line);
    font-size: 0.78rem;
    color: var(--c-muted);
}
.article__meta span { display: inline-flex; align-items: center; gap: 0.5rem; }
.article__meta svg { width: 15px; height: 15px; color: var(--c-gold-deep); }
.article__author { display: flex; align-items: center; gap: 0.75rem; }
.article__author img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 1px var(--c-gold);
}

.article__hero {
    margin-bottom: clamp(2.5rem, 4vw, 3.5rem);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.article__hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* Share buttons */
.share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--c-grey-line);
}
.share__label {
    margin-right: 0.5rem;
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--c-muted);
}
.share__btn {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--c-grey-line);
    color: var(--c-body);
    transition: all var(--t-fast) var(--ease);
}
.share__btn svg { width: 17px; height: 17px; }
.share__btn:hover {
    background: var(--c-gold);
    border-color: var(--c-gold);
    color: var(--c-white);
    transform: translateY(-3px);
}
/* Toggled briefly by pages.js after the URL is copied. */
.share__btn.is-copied { background: var(--c-green); border-color: var(--c-green); color: var(--c-white); }

/* Previous / next */
.article__nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 3rem;
}
.article__nav a {
    display: grid;
    gap: 0.4rem;
    padding: 1.5rem 1.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--c-grey-line);
    background: var(--c-white);
    transition: all var(--t-fast) var(--ease);
}
.article__nav a:hover { border-color: var(--c-gold); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.article__nav span {
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--c-gold-deep);
}
.article__nav strong {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--c-ink);
}
.article__nav .is-next { text-align: right; }
.article__nav .is-placeholder { opacity: 0.4; pointer-events: none; }

/* ------------------------------------------------------------------
   11. CONTACT
   ------------------------------------------------------------------ */
.contact__layout {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: clamp(2.5rem, 5vw, 5rem);
    align-items: start;
}

.info__list { display: grid; gap: 1rem; }
.info-card {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem 1.6rem;
    border-radius: var(--radius);
    background: var(--c-white);
    border: 1px solid var(--c-grey-line);
    transition: all var(--t-fast) var(--ease);
}
.info-card:hover { border-color: var(--c-gold); transform: translateX(5px); box-shadow: var(--shadow-sm); }
.info-card__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: var(--c-beige-soft);
    color: var(--c-gold-deep);
}
.info-card__icon svg { width: 21px; height: 21px; }
.info-card h3 {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--c-muted);
    margin-bottom: 0.4rem;
}
.info-card p, .info-card a { font-size: 0.95rem; color: var(--c-ink); line-height: 1.6; }
.info-card a:hover { color: var(--c-gold-deep); }

.hours { display: grid; gap: 0.5rem; margin-top: 0.35rem; }
.hours div { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.86rem; }
.hours dt { color: var(--c-muted); }
.hours dd { margin: 0; color: var(--c-ink); }

/* Map placeholder */
.map {
    display: grid;
    place-items: center;
    gap: 0.5rem;
    height: 260px;
    margin-top: 1rem;
    border-radius: var(--radius);
    border: 1px dashed var(--c-grey-line);
    background:
        repeating-linear-gradient(45deg, var(--c-grey) 0 12px, var(--c-beige-soft) 12px 24px);
    text-align: center;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--c-muted);
    transition: border-color var(--t-base) var(--ease);
}
.map:hover { border-color: var(--c-gold); }
.map svg { width: 26px; height: 26px; color: var(--c-gold-deep); }

/* Form */
.form {
    padding: clamp(1.75rem, 3vw, 3rem);
    border-radius: var(--radius-lg);
    background: var(--c-white);
    border: 1px solid var(--c-grey-line);
    box-shadow: var(--shadow);
}
.form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.field { display: grid; gap: 0.55rem; }
.field--full { grid-column: 1 / -1; }

.field label {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-muted);
}
.field .req { color: var(--c-gold-deep); }

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 0.95rem 1.15rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--c-grey-line);
    background: var(--c-ivory);
    font-size: 0.95rem;
    color: var(--c-ink);
    transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.field textarea { min-height: 150px; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--c-gold);
    box-shadow: 0 0 0 4px var(--c-gold-glow);
}

/* Validation states are driven by pages.js, never by :invalid alone —
   an untouched empty field must not look like an error. */
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
    border-color: #b3261e;
    box-shadow: 0 0 0 4px rgba(179, 38, 30, 0.1);
}
.field__error {
    display: none;
    font-size: 0.76rem;
    letter-spacing: 0.02em;
    text-transform: none;
    color: #b3261e;
}
.field.has-error .field__error { display: block; }

.form__submit { margin-top: 2rem; }
.form__submit .btn { width: 100%; }

/* Success panel, revealed on valid submit. */
.form__success {
    display: none;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-sm);
    background: rgba(31, 81, 55, 0.08);
    border-left: 3px solid var(--c-green-mid);
    font-size: 0.9rem;
    color: var(--c-green);
}
.form__success.is-visible { display: flex; }
.form__success svg { flex: none; width: 20px; height: 20px; color: var(--c-green-mid); }

.form__note { margin-top: 1.25rem; font-size: 0.78rem; color: var(--c-muted); text-align: center; }

/* ------------------------------------------------------------------
   12. FAQ ACCORDION
   ------------------------------------------------------------------ */
.faq__layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: clamp(2rem, 4vw, 4rem);
    align-items: start;
}

.faq__nav { position: sticky; top: calc(var(--header-h) + 1.5rem); display: grid; gap: 0.2rem; }
.faq__nav a {
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--c-muted);
    transition: all var(--t-fast) var(--ease);
}
.faq__nav a:hover { background: var(--c-beige-soft); color: var(--c-ink); }

.faq__group + .faq__group { margin-top: 3rem; }
.faq__group h2 {
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
    scroll-margin-top: calc(var(--header-h) + 1.5rem);
}

.accordion { display: grid; gap: 0.85rem; }

.accordion__item {
    border-radius: var(--radius);
    background: var(--c-white);
    border: 1px solid var(--c-grey-line);
    overflow: hidden;
    transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.accordion__item.is-open { border-color: var(--c-gold); box-shadow: var(--shadow-sm); }

.accordion__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    width: 100%;
    padding: 1.35rem 1.6rem;
    text-align: left;
    font-family: var(--font-display);
    font-size: 1.2rem;
    line-height: 1.4;
    color: var(--c-ink);
    transition: color var(--t-fast) var(--ease);
}
.accordion__trigger:hover { color: var(--c-gold-deep); }

.accordion__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--c-grey-line);
    color: var(--c-muted);
    transition: all var(--t-base) var(--ease);
}
.accordion__icon svg { width: 15px; height: 15px; }
.accordion__item.is-open .accordion__icon {
    background: var(--c-gold);
    border-color: var(--c-gold);
    color: var(--c-white);
    transform: rotate(180deg);
}

/* Height is animated from a measured pixel value set by pages.js —
   `auto` is not an animatable length. */
.accordion__panel {
    height: 0;
    overflow: hidden;
    transition: height var(--t-base) var(--ease-out);
}
.accordion__panel > div {
    padding: 0 1.6rem 1.5rem;
    font-size: 0.94rem;
    line-height: 1.8;
    color: var(--c-muted);
}

/* ------------------------------------------------------------------
   13. LEGAL PROSE
   ------------------------------------------------------------------ */
.legal { max-width: 78ch; margin-inline: auto; }
.legal__updated {
    display: inline-block;
    margin-bottom: 2.5rem;
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-pill);
    background: var(--c-beige-soft);
    font-size: 0.76rem;
    letter-spacing: 0.1em;
    color: var(--c-gold-deep);
}
.legal h2 {
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-size: 1.75rem;
    scroll-margin-top: calc(var(--header-h) + 1.5rem);
}
.legal h3 { margin-top: 2rem; margin-bottom: 0.75rem; font-size: 1.25rem; }
.legal p + p { margin-top: 1rem; }
.legal p { line-height: 1.9; }
.legal ul { display: grid; gap: 0.65rem; margin-top: 1rem; }
.legal ul li { display: flex; gap: 0.9rem; line-height: 1.8; }
.legal ul li::before {
    content: "";
    flex: none;
    width: 6px;
    height: 6px;
    margin-top: 0.7rem;
    background: var(--c-gold);
    transform: rotate(45deg);
}
.legal a { color: var(--c-gold-deep); text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------------
   14. 404
   ------------------------------------------------------------------ */
.error {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 100svh;
    padding-block: calc(var(--header-h) + 3rem) 4rem;
    overflow: hidden;
    text-align: center;
    background: linear-gradient(180deg, var(--c-beige-soft), var(--c-ivory));
}

.error__inner { position: relative; z-index: 1; max-width: 720px; }

/* The hero petals are white-tinted for a dark overlay. On this ivory
   background they would be invisible, so warm them up. */
.error .petal {
    background: linear-gradient(135deg,
        rgba(241, 231, 217, 0.98) 0%,
        rgba(224, 205, 175, 0.9) 45%,
        rgba(166, 135, 63, 0.7) 100%);
    box-shadow: inset -1px -2px 3px rgba(120, 96, 44, 0.22);
}

/* Oversized ghost numeral behind the message. Solid gold first: if
   background-clip:text is unsupported, `color: transparent` would
   otherwise erase the numeral entirely rather than degrade it. */
.error__code {
    font-family: var(--font-display);
    font-size: clamp(9rem, 4rem + 22vw, 22rem);
    font-weight: 300;
    line-height: 0.85;
    letter-spacing: -0.04em;
    color: var(--c-gold);
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
    .error__code {
        background: linear-gradient(180deg, var(--c-gold) 0%, rgba(192, 160, 98, 0.15) 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
}

.error__title { margin-block: 1rem 1.25rem; }
.error__text { margin-bottom: 2.5rem; }

.error .search { margin: 0 auto 2.5rem; }

.error__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }

.error__links {
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--c-grey-line);
}
.error__links h2 {
    margin-bottom: 1.25rem;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--c-muted);
}
.error__links ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; }
.error__links a {
    display: inline-block;
    padding: 0.6rem 1.3rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--c-grey-line);
    background: var(--c-white);
    font-size: 0.82rem;
    transition: all var(--t-fast) var(--ease);
}
.error__links a:hover {
    border-color: var(--c-gold);
    color: var(--c-gold-deep);
    transform: translateY(-2px);
}

/* ==================================================================
   15. RESPONSIVE
   ================================================================== */
@media (max-width: 1200px) {
    .team__grid,
    .packages__grid { grid-template-columns: repeat(2, 1fr); }
    .certs__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
    /* Sticky sidebars stop being sticky once they stack. */
    .article__layout,
    .faq__layout { grid-template-columns: 1fr; }
    .toc,
    .faq__nav { position: static; }
    .faq__nav { display: flex; flex-wrap: wrap; gap: 0.5rem; }
    .faq__nav a { border: 1px solid var(--c-grey-line); border-radius: var(--radius-pill); }

    .detail__layout,
    .contact__layout,
    .story__grid { grid-template-columns: 1fr; }
    .detail__panel { position: static; }
    .story__media { order: -1; }

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

    /* Journey collapses to a single left-hand rail. */
    .journey__list::before { left: 42px; }
    .journey__item { grid-template-columns: auto 1fr; gap: 1.5rem; }
    .journey__year { grid-column: 1; width: 84px; height: 84px; }
    .journey__item:nth-child(odd)  .journey__card,
    .journey__item:nth-child(even) .journey__card { grid-column: 2; text-align: left; }

    .lightbox { grid-template-columns: 1fr; }
    .lightbox__figure { grid-column: 1; }
    .lightbox__nav {
        position: absolute;
        bottom: clamp(1rem, 3vw, 2rem);
    }
    .lightbox__nav--prev { left: 25%; }
    .lightbox__nav--next { right: 25%; }
    .lightbox__counter { bottom: calc(clamp(1rem, 3vw, 2rem) + 1.1rem); }
}

@media (max-width: 768px) {
    .team__grid,
    .packages__grid,
    .certs__grid { grid-template-columns: 1fr; }

    .form__grid { grid-template-columns: 1fr; }
    .detail__thumbs { grid-template-columns: repeat(3, 1fr); }

    .article__nav { grid-template-columns: 1fr; }
    .article__nav .is-next { text-align: left; }

    .breadcrumb__list { font-size: 0.68rem; }
    .lightbox__image { max-height: 62vh; }
}

@media (max-width: 560px) {
    .journey__list::before { left: 28px; }
    .journey__year { width: 56px; height: 56px; font-size: 0.95rem; box-shadow: 0 0 0 5px var(--c-ivory); }
    .journey__item { gap: 1rem; }

    .filters__btn { padding: 0.6rem 1rem; font-size: 0.7rem; }
    .pagination__btn { min-width: 40px; height: 40px; }

    .lightbox__nav--prev { left: 1rem; }
    .lightbox__nav--next { right: 1rem; }
}

/* Reduced motion — the banner zoom and lightbox entrance are decorative. */
@media (prefers-reduced-motion: reduce) {
    .page-banner__media img { animation: none; }
    .lightbox__image { animation: none; }
    .accordion__panel { transition: none; }
}

/* ==================================================================
   16. PHASE 3 — DYNAMIC LISTINGS
   Filters, pagination and search are now server-rendered links and
   plain GET forms, so several of these selectors must style anchors
   where they previously styled buttons.
   ================================================================== */

/* Filters are <a> now, not <button> ------------------------------- */
.filters__btn {
    text-decoration: none;
    cursor: pointer;
}

/* Search + sort row ----------------------------------------------- */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.toolbar .search { width: min(420px, 100%); }

.toolbar__sort { display: flex; align-items: center; gap: 0.6rem; }
.toolbar__sort select {
    padding: 0.95rem 1.15rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--c-grey-line);
    background: var(--c-white);
    font-size: 0.86rem;
    color: var(--c-ink);
    cursor: pointer;
    transition: border-color var(--t-fast) var(--ease);
}
.toolbar__sort select:focus {
    outline: none;
    border-color: var(--c-gold);
    box-shadow: 0 0 0 4px var(--c-gold-glow);
}
.toolbar__go { padding: 0.9rem 1.6rem; }

.toolbar__count {
    margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
    text-align: center;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    color: var(--c-muted);
}

/* Decoration cards: badge, category eyebrow, price line ------------ */
.card-badge {
    position: absolute;
    z-index: 1;
    top: 1rem;
    left: 1rem;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-pill);
    background: var(--c-gold);
    color: var(--c-white);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.card-eyebrow {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--c-gold-deep);
}

.card-price {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    margin-top: 0.9rem;
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--c-green);
}
.card-price small {
    font-family: var(--font-body);
    font-size: 0.6rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-muted);
}

/* Pagination: anchors and disabled spans --------------------------- */
.pagination__btn { text-decoration: none; }
.pagination__btn.is-disabled {
    opacity: 0.3;
    pointer-events: none;
}
.pagination__gap {
    padding-inline: 0.35rem;
    color: var(--c-muted);
    user-select: none;
}

/* Form alerts ------------------------------------------------------ */
.form__alert {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}
.form__alert svg { flex: none; width: 20px; height: 20px; margin-top: 0.15rem; }
.form__alert strong { display: block; margin-bottom: 0.25rem; color: var(--c-ink); }
.form__alert p { margin: 0; color: var(--c-muted); font-size: 0.86rem; line-height: 1.65; }

.form__alert--success {
    background: rgba(31, 81, 55, 0.08);
    border-left: 3px solid var(--c-green-mid);
}
.form__alert--success svg { color: var(--c-green-mid); }

.form__alert--error {
    background: rgba(179, 38, 30, 0.07);
    border-left: 3px solid #b3261e;
}
.form__alert--error svg { color: #b3261e; }

/* The honeypot must be unreachable, not merely invisible: a field
   hidden with display:none is skipped by some autofill agents, and a
   field moved off-screen is still tabbable unless tabindex says no. */
.honeypot {
    position: absolute !important;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Contact map iframe ---------------------------------------------- */
.map { padding: 0; overflow: hidden; border-style: solid; line-height: 0; }
.map iframe { display: block; width: 100%; height: 260px; border: 0; }

/* Recent posts ----------------------------------------------------- */
.recent__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.recent__item a {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem;
    border-radius: var(--radius);
    background: var(--c-white);
    border: 1px solid var(--c-grey-line);
    transition: all var(--t-fast) var(--ease);
}
.recent__item a:hover {
    border-color: var(--c-gold);
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}
.recent__item img {
    flex: none;
    width: 76px;
    height: 76px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}
.recent__cat {
    display: block;
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--c-gold-deep);
}
.recent__item strong {
    display: block;
    margin-block: 0.25rem;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.3;
    color: var(--c-ink);
}
.recent__date { font-size: 0.74rem; color: var(--c-muted); }

@media (max-width: 1024px) {
    .recent__list { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .toolbar { flex-direction: column; align-items: stretch; }
    .toolbar__sort { justify-content: space-between; }
    .toolbar__sort select { flex: 1; }
}

/* ==================================================================
   17. PHASE 5 — quote request, booking, tracking
   ================================================================== */

.container--narrow { max-width: 780px; }

/* Field help + file input, reused by the quote form */
.field__help { margin-top: .35rem; font-size: .78rem; color: var(--c-muted); }
.field input[type="file"] {
    width: 100%; padding: .8rem 1rem;
    border: 1px dashed var(--c-grey-line); border-radius: var(--radius-sm);
    background: var(--c-ivory); font-size: .9rem; cursor: pointer;
}
.field input[type="file"]:hover { border-color: var(--c-gold); }
.form--inline { box-shadow: var(--shadow-sm); }

/* Success / result panel after a submission */
.form-result {
    text-align: center;
    padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3rem);
    background: var(--c-white);
    border: 1px solid var(--c-grey-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.form-result__icon {
    display: grid; place-items: center;
    width: 68px; height: 68px; margin: 0 auto 1.5rem;
    border-radius: 50%; background: rgba(31, 81, 55, 0.09); color: var(--c-green-mid);
}
.form-result__icon svg { width: 32px; height: 32px; }
.form-result h2 { margin-bottom: 1rem; }
.form-result .lead { margin-bottom: 1rem; }
.form-result__actions {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 2rem;
}

/* Tracking result card */
.track-card {
    margin-top: 2.5rem;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    background: var(--c-white);
    border: 1px solid var(--c-grey-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.track-card__head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
    padding-bottom: 1.25rem; margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--c-grey-line);
}
.track-card__eyebrow {
    display: block; font-size: .66rem; letter-spacing: .22em; text-transform: uppercase;
    color: var(--c-gold-deep); margin-bottom: .3rem;
}
.track-card__head h3 { font-size: 1.6rem; }
.track-card__subhead { margin: 1.75rem 0 1rem; font-size: 1.1rem; }
.track-card__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.75rem; }

.track-pill {
    flex: none;
    padding: .4rem 1rem; border-radius: var(--radius-pill);
    font-size: .7rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
}
.track-pill.is-ok   { background: rgba(31, 81, 55, 0.1);  color: var(--c-green-mid); }
.track-pill.is-no   { background: rgba(179, 38, 30, 0.08); color: #b3261e; }
.track-pill.is-live { background: var(--c-gold-glow);      color: var(--c-gold-deep); }
.track-pill.is-wait { background: var(--c-grey);           color: var(--c-muted); }

.track-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 2rem; }
.track-meta > div { display: flex; flex-direction: column; gap: .2rem; }
.track-meta dt { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--c-muted); }
.track-meta dd { margin: 0; font-size: 1rem; color: var(--c-ink); }

.track-items { width: 100%; border-collapse: collapse; margin-top: 1.5rem; font-size: .9rem; }
.track-items th, .track-items td {
    padding: .7rem .5rem; text-align: left; border-bottom: 1px solid var(--c-grey-line);
}
.track-items th {
    font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--c-muted);
}
.track-items td:not(:first-child), .track-items th:not(:first-child) { text-align: right; }

.track-timeline { display: grid; gap: 0; }
.track-timeline li { display: flex; gap: 1rem; padding: .9rem 0; }
.track-timeline__dot {
    flex: none; width: 10px; height: 10px; margin-top: .4rem;
    border-radius: 50%; background: var(--c-gold);
}
.track-timeline strong { display: block; color: var(--c-ink); }
.track-timeline p { margin: .2rem 0; font-size: .88rem; color: var(--c-muted); }
.track-timeline__when { font-size: .74rem; color: var(--c-muted); }

@media (max-width: 560px) {
    .track-meta { grid-template-columns: 1fr; }
    .track-card__head { flex-direction: column; }
}

/* ==================================================================
   PHASE 7D — THE CUSTOMER PORTAL
   ==================================================================
   A customer uses this three times in their life. Everything is large,
   everything is labelled, and nothing assumes they will come back
   tomorrow and remember where anything was.
   ================================================================== */

.portal-login {
    max-width: 30rem;
    margin-inline: auto;
    padding: 2.25rem;
    background: var(--c-white);
    border: 1px solid var(--c-grey-line);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(26, 26, 24, 0.06);
}

.portal-login__head { text-align: center; margin-bottom: 1.75rem; }
.portal-login__head h1 { margin: .35rem 0 .5rem; font-size: 1.85rem; }
.portal-login__head p  { margin: 0; color: var(--c-muted); font-size: .92rem; }

.portal-login__form .fld { margin-bottom: 1.25rem; }

.portal-login__foot {
    margin: 1.5rem 0 0;
    text-align: center;
    font-size: .88rem;
    color: var(--c-muted);
}

/* The PIN box: four big digits, spaced, centred. A password field that
   looks like an ordinary password field invites an ordinary password. */
.pin-input {
    font-size: 1.75rem !important;
    letter-spacing: .75em;
    text-align: center;
    text-indent: .75em;      /* letter-spacing pads the right; this re-centres */
    font-family: var(--font-body);
}

.portal { padding: clamp(2rem, 5vw, 4rem) 0 5rem; }

.portal__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--c-grey-line);
}
.portal__head h1 { margin: .25rem 0 0; font-size: clamp(1.75rem, 4vw, 2.5rem); }

.portal-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.portal-stat {
    padding: 1.25rem 1.4rem;
    background: var(--c-white);
    border: 1px solid var(--c-grey-line);
    border-radius: 16px;
}
.portal-stat span   { display: block; font-size: .8rem; color: var(--c-muted); margin-bottom: .3rem; }
.portal-stat strong { display: block; font-family: var(--font-display); font-size: 1.75rem; color: var(--c-ink); }

.portal-stat--due { border-color: var(--c-gold); background: var(--c-gold-glow); }
.portal-stat--due strong { color: var(--c-gold-deep); }

.portal-pay {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    background: var(--c-green);
    color: rgba(255, 255, 255, .88);
    border-radius: 16px;
}
.portal-pay p { margin: 0; }
.portal-pay strong { color: var(--c-white); }

.portal-grid {
    display: grid;
    grid-template-columns: 1fr 20rem;
    gap: 1.5rem;
    align-items: start;
}

.portal-card {
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    background: var(--c-white);
    border: 1px solid var(--c-grey-line);
    border-radius: 18px;
}
.portal-card h2 { margin: 0 0 1.1rem; font-size: 1.2rem; }
.portal-card__note { margin: -.6rem 0 1.1rem; color: var(--c-muted); font-size: .88rem; }

.portal-card--help { background: var(--c-ivory); }
.portal-card--help .btn { margin-bottom: .5rem; justify-content: center; }
.portal-card--help .btn svg { width: 16px; height: 16px; margin-right: .4rem; }

/* --- The journey ------------------------------------------------- */
.journey { list-style: none; margin: 0; padding: 0; }

.journey__step {
    position: relative;
    display: grid;
    grid-template-columns: 30px 1fr auto;
    gap: .9rem;
    align-items: start;
    padding-bottom: 1.4rem;
}
.journey__step:last-child { padding-bottom: 0; }

/* The line joins each step to the next. Drawn on the step, so a journey of
   any length joins up without the markup counting its own stages. */
.journey__step::before {
    content: "";
    position: absolute;
    left: 14px; top: 30px; bottom: 0;
    width: 2px;
    background: var(--c-grey-line);
}
.journey__step:last-child::before { display: none; }

.journey__mark {
    display: grid;
    place-items: center;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--c-grey);
    color: var(--c-muted);
}
.journey__mark svg { width: 14px; height: 14px; }

.journey__step.is-done .journey__mark { background: var(--c-green); color: var(--c-white); }
.journey__step.is-done::before        { background: var(--c-green); }
.journey__step.is-waiting             { opacity: .5; }

.journey__step strong { display: block; font-weight: 500; }
.journey__step span   { display: block; font-size: .86rem; color: var(--c-muted); }

.journey__step time,
.journey__pending {
    font-size: .78rem;
    color: var(--c-muted);
    white-space: nowrap;
    padding-top: .35rem;
}

/* --- A booking card ---------------------------------------------- */
.portal-booking {
    padding: 1.1rem 0;
    border-top: 1px solid var(--c-grey-line);
}
.portal-booking:first-of-type { border-top: 0; padding-top: 0; }

.portal-booking header {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .7rem;
}

.portal-booking dl {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: .6rem 1rem;
    margin: 0;
}
.portal-booking dt { font-size: .75rem; color: var(--c-muted); margin-bottom: .1rem; }
.portal-booking dd { margin: 0; font-weight: 500; }

.portal-pill {
    padding: .2rem .65rem;
    border-radius: 999px;
    background: var(--c-grey);
    color: var(--c-muted);
    font-size: .72rem;
    font-weight: 500;
    white-space: nowrap;
}
.portal-pill--completed { background: rgba(31, 122, 76, .1); color: #1f7a4c; }
.portal-pill--cancelled { background: rgba(179, 38, 30, .08); color: #b3261e; }
.portal-pill--confirmed,
.portal-pill--planning,
.portal-pill--installation-started,
.portal-pill--event-running { background: var(--c-gold-glow); color: var(--c-gold-deep); }

/* --- Lists in the sidebar ---------------------------------------- */
.portal-list { list-style: none; margin: 0; padding: 0; }

.portal-list li + li { border-top: 1px solid var(--c-grey-line); }

.portal-list a,
.portal-list--plain li > span {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 0;
    text-decoration: none;
    color: inherit;
}
.portal-list a:hover { color: var(--c-gold-deep); }
.portal-list a svg { width: 17px; height: 17px; color: var(--c-gold); flex: none; }

.portal-list strong { display: block; font-weight: 500; font-size: .9rem; }
.portal-list em     { display: block; font-style: normal; font-size: .78rem; color: var(--c-muted); }

/* --- Photographs -------------------------------------------------- */
.portal-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: .75rem;
}

.portal-photo { margin: 0; }

.portal-photo__btn {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
    border-radius: 12px;
    overflow: hidden;
}
.portal-photo__btn:focus-visible { outline: 2px solid var(--c-gold); outline-offset: 2px; }

.portal-photo img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    transition: transform var(--t-med) var(--ease);
}
.portal-photo__btn:hover img { transform: scale(1.05); }

.portal-photo figcaption {
    margin-top: .35rem;
    font-size: .72rem;
    color: var(--c-muted);
}

/* --- The message thread ------------------------------------------- */
.thread {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-bottom: 1.25rem;
    max-height: 26rem;
    overflow-y: auto;
}

.thread__msg {
    max-width: 80%;
    padding: .75rem 1rem;
    border-radius: 14px;
}
.thread__msg p    { margin: 0; line-height: 1.6; font-size: .92rem; }
.thread__msg time { display: block; margin-top: .35rem; font-size: .7rem; opacity: .65; }

/* "me" is whoever is reading. In the portal that is the customer; in the
   admin it is the office. Same class, opposite meaning, and each page
   assigns it from its own point of view. */
.thread__msg--me {
    align-self: flex-end;
    background: var(--c-green);
    color: rgba(255, 255, 255, .92);
}
.thread__msg--them {
    align-self: flex-start;
    background: var(--c-grey);
    color: var(--c-body);
}

.thread__form textarea {
    width: 100%;
    margin-bottom: .75rem;
    padding: .85rem 1rem;
    border: 1px solid var(--c-grey-line);
    border-radius: 12px;
    font: inherit;
    resize: vertical;
}
.thread__form textarea:focus-visible { outline: 2px solid var(--c-gold); outline-offset: 1px; }

@media (max-width: 900px) {
    .portal-grid { grid-template-columns: 1fr; }
}

/* ==================================================================
   PHASE 7D — THE STAFF PORTAL
   ==================================================================
   A phone, one hand, outdoors, in a hurry. Every target is at least
   58px. There is no navigation, because a crew member on a ladder does
   not navigate.
   ================================================================== */

/* The crew do not need the marketing nav, and the action bar would sit on
   top of the check-in button — which is the one thing they came for. */
.staff-portal .site-header,
.staff-portal .actionbar { display: none; }
.staff-portal body { padding-bottom: 0; }

.staff { padding: 1.5rem 0 4rem; }

.staff__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.staff__head h1 { margin: .2rem 0 .1rem; font-size: 1.9rem; }
.staff__head p  { margin: 0; color: var(--c-muted); font-size: .88rem; }

.staff-card {
    padding: 1.4rem;
    margin-bottom: 1rem;
    background: var(--c-white);
    border: 1px solid var(--c-grey-line);
    border-radius: 18px;
}
.staff-card h2 {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 0 0 1rem;
    font-size: 1.1rem;
}

.staff-card--empty { text-align: center; padding: 2.5rem 1.5rem; }
.staff-card--empty svg { width: 36px; height: 36px; margin: 0 auto 1rem; color: var(--c-gold); }
.staff-card--empty p { color: var(--c-muted); margin: .4rem 0 0; }

.staff-count { font-size: .8rem; font-weight: 400; color: var(--c-muted); }

/* Switching between two events on one day. */
.staff-switch {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding-bottom: .5rem;
    margin-bottom: 1rem;
}
.staff-switch a {
    flex: none;
    padding: .7rem 1.1rem;
    border: 1px solid var(--c-grey-line);
    border-radius: 12px;
    background: var(--c-white);
    text-decoration: none;
    color: var(--c-body);
    text-align: center;
    font-size: .9rem;
    font-weight: 500;
}
.staff-switch a span { display: block; font-size: .68rem; color: var(--c-muted); font-weight: 400; }
.staff-switch a.is-active { background: var(--c-green); color: #fff; border-color: var(--c-green); }
.staff-switch a.is-active span { color: rgba(255, 255, 255, .6); }

.staff-event header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.1rem;
}
.staff-event header h2 { margin: 0; }
.staff-event header p  { margin: .2rem 0 0; font-size: .85rem; color: var(--c-muted); }

.staff-time {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--c-gold-deep);
    white-space: nowrap;
}

.staff-pill {
    display: inline-block;
    padding: .12rem .5rem;
    border-radius: 999px;
    background: var(--c-gold-glow);
    color: var(--c-gold-deep);
    font-size: .68rem;
    font-weight: 600;
}

.staff-details { margin: 0 0 1.25rem; }
.staff-details > div { display: flex; gap: .75rem; padding: .5rem 0; border-top: 1px solid var(--c-grey-line); }
.staff-details > div:first-child { border-top: 0; }
.staff-details dt {
    display: flex; align-items: center; gap: .4rem;
    flex: 0 0 7rem;
    font-size: .8rem; color: var(--c-muted);
}
.staff-details dt svg { width: 14px; height: 14px; }
.staff-details dd { margin: 0; font-weight: 500; }

.staff-call {
    margin-left: .5rem;
    padding: .15rem .6rem;
    border-radius: 999px;
    background: var(--c-green);
    color: #fff !important;
    font-size: .72rem;
    text-decoration: none;
}

/* --- Arrival and departure --------------------------------------- */
.staff-attend textarea {
    width: 100%;
    margin-bottom: .75rem;
    padding: .8rem 1rem;
    border: 1px solid var(--c-grey-line);
    border-radius: 12px;
    font: inherit;
}

/* A thumb on a moving van. 44px is the WCAG minimum; 58 is the honest one. */
.btn--big {
    min-height: 58px;
    font-size: .9rem;
}
.btn--big svg { width: 18px; height: 18px; margin-right: .5rem; }

.staff-attend__in,
.staff-attend__done {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0 0 1rem;
    padding: .8rem 1rem;
    border-radius: 12px;
    background: rgba(31, 122, 76, .08);
    color: #1f7a4c;
    font-size: .92rem;
}
.staff-attend__in svg,
.staff-attend__done svg { width: 18px; height: 18px; flex: none; }
.staff-attend__done { margin-bottom: 0; }

/* --- The checklist ----------------------------------------------- */
.checklist-tasks { list-style: none; margin: 0; padding: 0; }

.checklist-tasks li + li { border-top: 1px solid var(--c-grey-line); }

.checklist-tasks button {
    display: flex;
    align-items: center;
    gap: .9rem;
    width: 100%;
    min-height: 58px;
    padding: .9rem 0;
    border: 0;
    background: none;
    text-align: left;
    cursor: pointer;
    font: inherit;
}
.checklist-tasks button:focus-visible { outline: 2px solid var(--c-gold); outline-offset: -2px; border-radius: 8px; }

.checklist-tasks__box {
    display: grid;
    place-items: center;
    width: 28px; height: 28px;
    flex: none;
    border: 2px solid var(--c-grey-line);
    border-radius: 8px;
    color: transparent;
    transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.checklist-tasks__box svg { width: 15px; height: 15px; }

.checklist-tasks li.is-done .checklist-tasks__box {
    background: var(--c-green);
    border-color: var(--c-green);
    color: #fff;
}
.checklist-tasks li.is-done .checklist-tasks__label strong {
    text-decoration: line-through;
    color: var(--c-muted);
}

.checklist-tasks__label strong { display: block; font-weight: 500; }
.checklist-tasks__label em     { font-style: normal; font-size: .78rem; color: var(--c-muted); }

/* --- Uploading from a phone -------------------------------------- */
.staff-upload .fld { margin-bottom: 1rem; }
.staff-upload input[type="file"] {
    width: 100%;
    padding: .9rem;
    border: 2px dashed var(--c-grey-line);
    border-radius: 12px;
    background: var(--c-ivory);
}

.staff-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: .5rem;
    margin-top: 1.25rem;
}
.staff-photos figure { margin: 0; }
.staff-photos img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
}
.staff-photos figcaption {
    margin-top: .25rem;
    font-size: .68rem;
    color: var(--c-muted);
}
.staff-photos figcaption span {
    color: var(--c-gold-deep);
    font-weight: 600;
}

/* --- Coming up ---------------------------------------------------- */
.staff-upcoming { list-style: none; margin: 0; padding: 0; }
.staff-upcoming li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .8rem 0;
    border-top: 1px solid var(--c-grey-line);
}
.staff-upcoming li:first-child { border-top: 0; }

.staff-upcoming__date {
    flex: none;
    width: 3rem;
    text-align: center;
    line-height: 1.1;
}
.staff-upcoming__date strong { display: block; font-family: var(--font-display); font-size: 1.4rem; }
.staff-upcoming__date em     { font-style: normal; font-size: .7rem; text-transform: uppercase; color: var(--c-muted); }

.staff-upcoming__what { flex: 1; min-width: 0; }
.staff-upcoming__what strong { display: block; font-weight: 500; }
.staff-upcoming__what em     { font-style: normal; font-size: .8rem; color: var(--c-muted); }

.staff-history summary { cursor: pointer; list-style: none; }
.staff-history summary::-webkit-details-marker { display: none; }
.staff-history summary h2 { margin: 0; }
.staff-history ul { list-style: none; margin: 1rem 0 0; padding: 0; }
.staff-history li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .6rem 0;
    border-top: 1px solid var(--c-grey-line);
    font-size: .85rem;
}
.staff-history li span:last-child { color: var(--c-muted); }

@media (max-width: 480px) {
    .staff__head h1 { font-size: 1.6rem; }
    .staff-card { padding: 1.1rem; border-radius: 14px; }
}

/* ==================================================================
   PHASE 7D — SCROLL TO TOP
   ================================================================== */
.to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 80;

    display: grid;
    place-items: center;
    width: 44px; height: 44px;

    border: 1px solid var(--c-grey-line);
    border-radius: 50%;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(26, 26, 24, .1);
    color: var(--c-ink);
    cursor: pointer;

    /* Hidden until the visitor has scrolled far enough to want it. Opacity
       and visibility rather than display, so it can fade rather than blink. */
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity var(--t-med) var(--ease),
                transform var(--t-med) var(--ease),
                visibility var(--t-med) var(--ease);
}

.to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.to-top svg { width: 18px; height: 18px; transform: rotate(-90deg); }
.to-top:hover { border-color: var(--c-gold); color: var(--c-gold-deep); }
.to-top:focus-visible { outline: 2px solid var(--c-gold); outline-offset: 2px; }

/* Above the mobile action bar, not under it. */
@media (max-width: 767px) {
    .to-top { bottom: calc(56px + env(safe-area-inset-bottom, 0px) + .75rem); }
}

/* ==================================================================
   PHASE 7D — RECENTLY VIEWED
   ==================================================================
   Rendered by portal.js from localStorage. The whole section removes
   itself when there is no history, so this never styles an empty grid.
   ================================================================== */
.recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.recent-card {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    background: var(--c-white);
    border: 1px solid var(--c-grey-line);
    text-decoration: none;
    color: inherit;
    transition: border-color var(--t-fast) var(--ease), transform var(--t-med) var(--ease);
}
.recent-card:hover { border-color: var(--c-gold); transform: translateY(-3px); }
.recent-card:focus-visible { outline: 2px solid var(--c-gold); outline-offset: 2px; }

.recent-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.recent-card span {
    display: block;
    padding: .75rem .9rem;
    font-size: .88rem;
    font-weight: 500;
}
