/* ============================================================================
   RSL.lab — PAGES REDESIGN (mobile mockups, applied to desktop as well)
   Pages : pricelist.php (Services) · about_us.php · pre_grade.php
   Load  : AFTER style.css. Everything is scoped to body.pg-services /
           body.pg-about / body.pg-pregrade, so no other page is affected.
   Fonts : headers = IBM Plex Mono · descriptions = DM Sans
   Sizing: every measurement is in `em` off one base font-size (.pgx-root),
           which is 14px at a 390px-wide phone (the mockup width) and grows to
           16px on larger screens, so the mockup proportions hold everywhere.
   ============================================================================ */

body.pg-services,
body.pg-about,
body.pg-pregrade,
body.pg-faq,
body.pg-ourlab {
    --pg-head: 'IBM Plex Mono', monospace;
    --pg-desc: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --pg-ink: #111111;
    --pg-cream: #FEFBF3;
    --pg-gold: #C8A868;
    --pg-yellow: #FBEDB4;
}

/* shared base — one font size drives every em below */
body.pg-services .pgx-root,
body.pg-about .pgx-root,
body.pg-pregrade .pgx-root,
body.pg-faq .pgx-root,
body.pg-ourlab .pgx-root {
    font-family: var(--pg-desc);
    font-size: clamp(14px, 3.6vw, 16px);
    line-height: 1.45;
    flex: 1 0 auto;
    width: 100%;
}
body.pg-services .pgx-root h1, body.pg-services .pgx-root h2, body.pg-services .pgx-root h3,
body.pg-about .pgx-root h1, body.pg-about .pgx-root h2, body.pg-about .pgx-root h3,
body.pg-pregrade .pgx-root h1, body.pg-pregrade .pgx-root h2, body.pg-pregrade .pgx-root h3,
body.pg-faq .pgx-root h1, body.pg-faq .pgx-root h2, body.pg-faq .pgx-root h3,
body.pg-ourlab .pgx-root h1, body.pg-ourlab .pgx-root h2, body.pg-ourlab .pgx-root h3 {
    font-family: var(--pg-head);
    font-weight: 700;
    letter-spacing: 0;
    text-align: left;
}

/* page title + full-width rule (all three pages) */
.pgx-head { text-align: center; padding: 1.7em 2.3em 0; max-width: 40em; margin: 0 auto; }
.pgx-head h1 { text-align: center !important; font-size: 1.95em; line-height: 1.2; }
.pgx-rule { height: 0; border-top: 1.5px solid currentColor; margin: .85em 0 0; opacity: 1; }

/* generic "expand more" toggle (about + pre-grade) */
body.pg-about .pgx-expand,
body.pg-pregrade .pgx-expand {
    display: inline-flex; align-items: center; gap: .55em;
    width: auto; margin: 0; padding: .3em .2em;
    background: none; border: 0; border-radius: 0;
    font-family: var(--pg-desc); font-size: .95em; font-weight: 300; font-style: italic;
    letter-spacing: 0; color: inherit; cursor: pointer; transition: opacity .2s ease;
}
body.pg-about .pgx-expand:hover,
body.pg-pregrade .pgx-expand:hover { background: none; color: inherit; opacity: .75; }
body.pg-about .pgx-expand:focus-visible,
body.pg-pregrade .pgx-expand:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.pgx-expand svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s ease; }
.pgx-expand[aria-expanded="true"] svg { transform: rotate(180deg); }

.pgx-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .38s ease; }
.pgx-more > div { overflow: hidden; min-height: 0; }
.pgx-more:not(.open) > div { visibility: hidden; transition: visibility 0s .38s; }
.pgx-more.open { grid-template-rows: 1fr; }

/* ============================================================================
   SERVICES (pricelist.php)
   ============================================================================ */
/* ---------- CREAM BACKGROUND = homepage blueprint grid ----------
   Same 26px gold grid as .lab-console-bg on the homepage. Applied to the cream
   pages only; dark / yellow bands keep their own solid backgrounds, so the grid
   shows only on the cream areas. */
body.pg-about,
body.pg-pregrade,
body.pg-faq,
body.pg-ourlab {
    background-color: #FFFBF3;
    background-image:
        linear-gradient(rgba(197, 160, 89, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(197, 160, 89, 0.08) 1px, transparent 1px);
    background-size: 26px 26px;
    color: var(--pg-ink);
}

body.pg-services {
    background: #111111 url('photo/services/galaxy-bg.webp') center top / max(100%, 760px) auto repeat-y;
    color: #FFFFFF;
}
body.pg-services .svc-stage { position: relative; overflow: hidden; padding: 0 0 5.5em; isolation: isolate; }
body.pg-services .svc-inner { position: relative; z-index: 2; width: min(100%, 27em); margin: 0 auto; padding: 0 1.5em; }
body.pg-services .svc-inner .pgx-head { padding: 1.7em 0 0; max-width: none; }

body.pg-services .svc-lead {
    margin: 2.6em 0 1.4em; text-align: center; font-size: 1.15em; font-weight: 400; color: #FFFFFF;
}

/* tab bar */
body.pg-services .svc-tabs {
    display: flex; gap: .4em; padding: .4em; margin: 0 0 2.6em;
    border: 2px solid #FFFFFF; border-radius: .85em; background: #111111; position: relative; z-index: 2;
}
body.pg-services .svc-tab {
    flex: 1 1 0; width: auto; margin: 0; padding: .75em .2em;
    border: 0; border-radius: .5em;
    font-family: var(--pg-head); font-size: .9em; font-weight: 700; letter-spacing: 0;
    cursor: pointer; transition: background-color .25s ease, color .25s ease, transform .15s ease;
}
body.pg-services .svc-tab:hover { transform: none; }
body.pg-services .svc-tab:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
/* inactive = dark tint of each tier, label barely visible */
body.pg-services .svc-tab[data-t="standard"] { background: #1B263D; color: rgba(255,255,255,.2); }
body.pg-services .svc-tab[data-t="express"]  { background: #291C3F; color: rgba(255,255,255,.2); }
body.pg-services .svc-tab[data-t="priority"] { background: #3B3627; color: rgba(0,0,0,.5); }
body.pg-services .svc-tab[data-t="standard"]:hover { background: #22304d; }
body.pg-services .svc-tab[data-t="express"]:hover  { background: #33234f; }
body.pg-services .svc-tab[data-t="priority"]:hover { background: #473f2e; }
/* active = full tier colour */
body.pg-services .svc-tab[data-t="standard"].active { background: #447CED; color: #FFFFFF; }
body.pg-services .svc-tab[data-t="express"].active  { background: #884AF8; color: #FFFFFF; }
body.pg-services .svc-tab[data-t="priority"].active { background: #E2CA80; color: #111111; }

/* service card */
body.pg-services .svc-card {
    --grad: linear-gradient(115deg, #5593FD 0%, #5190F6 35%, #4576CA 100%);
    --btn-bg: #FFFFFF; --btn-fg: #447CED; --txt: #FFFFFF; --glow: 85, 147, 253;
    position: relative; width: 22em; max-width: 100%; margin: 0 auto;
    padding: .5em; border-radius: 1.75em;
    background: linear-gradient(160deg, rgba(255,255,255,.22), rgba(0,0,0,.06)), var(--grad);
    color: var(--txt); text-align: left;
    box-shadow: 0 1.4em 3.6em rgba(var(--glow), .2);
    animation: svcIn .28s ease;
}
body.pg-services .svc-card[hidden] { display: none; }
body.pg-services .svc-card.is-express {
    --grad: linear-gradient(100deg, #C59BFF 0%, #C59BFF 22%, #A566FF 58%, #964BFF 92%);
    --btn-fg: #884AF8; --glow: 150, 75, 255;
}
body.pg-services .svc-card.is-priority {
    --grad: linear-gradient(105deg, #E2D8BB 0%, #E2D8BB 25%, #DFC77F 62%, #DCBC64 100%);
    --btn-bg: #000000; --btn-fg: #E2CA80; --txt: #111111; --glow: 220, 188, 100;
}
body.pg-services .svc-card-in {
    border-radius: 1.25em; padding: 1.75em 1.7em 1.2em;
    background: var(--grad);
    box-shadow: inset 0 .25em .7em rgba(0,0,0,.14), inset 0 -.15em .5em rgba(255,255,255,.1);
}
body.pg-services .svc-icon { display: block; margin: 0 auto 1em; width: auto; }
/* all three icons are centred in the same 3.5em slot (= the Priority card) so the three cards are exactly the same size */
body.pg-services .is-standard .svc-icon { height: 2.15em; margin: .675em auto 1.675em; }
body.pg-services .is-express  .svc-icon { height: 3.25em; margin: .125em auto 1.125em; }
body.pg-services .is-priority .svc-icon { height: 3.5em;  margin: 0 auto 1em; }
body.pg-services .svc-card h2 {
    font-size: 1.43em; line-height: 1.2; text-align: center !important; color: inherit; margin: 0;
}
body.pg-services .svc-days { margin: .3em 0 0; text-align: center; font-size: 1em; font-weight: 400; color: inherit; }
body.pg-services .svc-dash {
    height: .2em; margin: 1.5em 0 1.15em; border: 0; border-radius: .1em;
    background: repeating-linear-gradient(90deg, currentColor 0 .95em, transparent .95em 1.5em);
}
body.pg-services .svc-rows { list-style: none; margin: 0; padding: 0 .45em; }
body.pg-services .svc-rows li { display: flex; align-items: baseline; justify-content: space-between; gap: .6em; padding: .7em 0; }
body.pg-services .svc-price { font-size: 1.3em; font-weight: 600; line-height: 1.2; white-space: nowrap; }
body.pg-services .svc-price sup { font-size: .55em; font-weight: 600; vertical-align: top; position: relative; top: -.1em; line-height: 1; }
body.pg-services .svc-qty { font-size: .95em; font-weight: 400; opacity: .95; white-space: nowrap; }
body.pg-services .svc-order {
    display: block; width: 100%; margin: 1.55em 0 0; padding: .72em 0;
    background: var(--btn-bg); color: var(--btn-fg); border: 0; border-radius: .45em;
    font-family: var(--pg-head); font-size: 1.36em; font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease;
}
body.pg-services .svc-order:hover { background: var(--btn-bg); color: var(--btn-fg); transform: translateY(-2px); box-shadow: 0 .5em 1.2em rgba(0,0,0,.25); }
body.pg-services .svc-order:active { transform: translateY(1px); box-shadow: none; }
body.pg-services .svc-order:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
body.pg-services .svc-note {
    margin: 3em 0 0; text-align: center; font-family: var(--pg-head); font-size: .86em; font-weight: 500;
    text-transform: uppercase; letter-spacing: .02em; color: #FFFFFF;
}
@keyframes svcIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- SERVICE CAROUSEL ----------
   The active card is centred; the previous / next tier peeks out on each side, very dark, and lights up
   (becomes a normal card) when it slides to the middle.
   Desktop (>= 900px): round arrows sit on the dark previews. Mobile: no arrows — swipe the card.
   All three cards share one grid cell, so the carousel is exactly as tall as the tallest card. */
body.pg-services .svc-carousel {
    --w: min(22em, calc(100vw - 2.5em));   /* card width */
    --gap: .8em;                           /* space between the cards */
    position: relative; z-index: 2;
    margin: 0 calc(50% - 50vw);            /* break out of .svc-inner: full window width */
}
body.pg-services .svc-viewport {
    /* the padding / negative margin pair keeps the card's glow from being clipped without changing the layout height */
    overflow: hidden; padding: 1.6em 0 4em; margin: -1.6em 0 -4em;
    touch-action: pan-y; cursor: grab; -webkit-user-select: none; user-select: none;
}
body.pg-services .svc-carousel.dragging .svc-viewport { cursor: grabbing; }
body.pg-services .svc-track { display: grid; justify-items: center; align-items: start; }
body.pg-services .svc-track .svc-card {
    grid-area: 1 / 1; width: var(--w); max-width: none; margin: 0; animation: none;
    transform: translate3d(calc(var(--o, 0) * (var(--w) + var(--gap)) + var(--drag, 0px)), 0, 0) scale(.9);
    opacity: .3; filter: brightness(.4) saturate(.8);
    transition: transform .5s cubic-bezier(.65, 0, .35, 1), opacity .5s ease, filter .5s ease;
    will-change: transform; cursor: pointer; z-index: 1;
}
body.pg-services .svc-track .svc-card.is-active { transform: translate3d(var(--drag, 0px), 0, 0); opacity: 1; filter: none; cursor: inherit; z-index: 2; }
body.pg-services .svc-track .svc-card.is-far { opacity: 0; visibility: hidden; pointer-events: none; }
body.pg-services .svc-carousel.dragging .svc-card { transition: none; }
/* a preview is only for looking at / tapping: its "Order Now" link wakes up once the card is in the middle */
body.pg-services .svc-track .svc-card:not(.is-active) .svc-order { pointer-events: none; }
body.pg-services .svc-track .svc-card:not(.is-active) img { pointer-events: none; -webkit-user-drag: none; }

/* arrows: desktop only, centred on the dark previews */
body.pg-services .svc-arrow {
    display: none; position: absolute; top: 50%; z-index: 4; width: 3.2em; height: 3.2em; margin: -1.6em 0 0;
    padding: 0; align-items: center; justify-content: center;
    border: 2px solid #FFFFFF; border-radius: 50%; background: rgba(17, 17, 17, .72); color: #FFFFFF;
    font-family: var(--pg-head); font-size: 1em; line-height: 1; cursor: pointer;
    transition: background-color .2s ease, color .2s ease, transform .2s ease, opacity .25s ease, visibility .25s;
}
body.pg-services .svc-arrow span { display: block; font-size: 1.9em; line-height: 1; margin-top: -.12em; }
body.pg-services .svc-arrow:hover { background: #FFFFFF; color: #111111; transform: scale(1.08); }
body.pg-services .svc-arrow:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 3px; }
body.pg-services .svc-arrow[disabled] { opacity: 0; visibility: hidden; pointer-events: none; }
body.pg-services .svc-prev { left: calc(50% - var(--w) - var(--gap) - 1.6em); }
body.pg-services .svc-next { right: calc(50% - var(--w) - var(--gap) - 1.6em); }
@media (min-width: 900px) {
    body.pg-services .svc-carousel { --w: 22em; --gap: 1.2em; }
    body.pg-services .svc-arrow { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
    body.pg-services .svc-track .svc-card, body.pg-services .svc-arrow { transition: none; }
}

/* ---------- CARDS AS STARS: small slabs floating in the background ---------- */
body.pg-services .star-field { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
body.pg-services .star-card {
    position: absolute; left: var(--x); top: var(--y);
    width: calc(var(--w) * .5); height: auto; border-radius: 3px;
    opacity: .8; filter: brightness(.5) contrast(1.05); box-shadow: 0 .5em 1.4em rgba(0,0,0,.7);
    transform: rotate(var(--r));
    /* drifts slowly across the whole page while tumbling, leaves one side and comes back from the other */
    animation: starDrift calc(var(--d) * 7) linear calc(var(--delay) * 9) infinite;
    will-change: transform; user-select: none; -webkit-user-drag: none;
}
body.pg-services .star-card:nth-child(even) { animation-direction: reverse; }
body.pg-services .star-card:nth-child(3n) { animation-duration: calc(var(--d) * 9); }
@keyframes starDrift {
    0%   { transform: translate3d(-115vw, 0, 0) rotate(var(--r)); }
    50%  { transform: translate3d(0, var(--dy), 0) rotate(calc(var(--r) + 330deg)); }
    100% { transform: translate3d(115vw, calc(var(--dy) * -1), 0) rotate(calc(var(--r) + 660deg)); }
}
/* desktop only: bigger cards, and hovering one freezes it in place */
@media (min-width: 700px) {
    body.pg-services .star-card { width: var(--w); }
}
@media (hover: hover) and (pointer: fine) {
    body.pg-services .star-card { pointer-events: auto; cursor: pointer; }
    body.pg-services .star-card:hover { animation-play-state: paused; filter: brightness(.85); opacity: .95; }
}
@media (prefers-reduced-motion: reduce) {
    body.pg-services .star-card { animation: none; }
    body.pg-services .svc-card { animation: none; }
}

/* SERVICES — DESKTOP (>= 900px): the whole page (navbar + title + tabs + card + note + footer)
   fits one screen, no scrolling. Every size is in em, so the single font-size below scales
   everything with the window height (nav 55px + footer 68px are fixed). */
@media (min-width: 900px) {
    body.pg-services .pgx-root { font-size: clamp(10px, calc((100svh - 126px) / 43.5), 17px); }
    body.pg-services .svc-stage { padding-bottom: .5em; }
    body.pg-services .svc-inner .pgx-head { padding-top: .9em; }
    body.pg-services .svc-lead { margin: 1.3em 0 .8em; }
    body.pg-services .svc-tabs { margin-bottom: 1.5em; }
    body.pg-services .svc-tab { padding: .8em .2em; font-size: 1em; }
    body.pg-services .svc-card-in { padding: 1.3em 1.7em 1em; }
    body.pg-services .svc-dash { margin: 1.1em 0 .8em; }
    body.pg-services .svc-rows li { padding: .45em 0; }
    body.pg-services .svc-order { margin-top: 1em; }
    body.pg-services .svc-note { margin-top: 1.4em; }
}

/* ============================================================================
   ABOUT US (about_us.php)
   ============================================================================ */
body.pg-about { color: var(--pg-ink); }
body.pg-about .ab-wrap { max-width: 38em; margin: 0 auto; padding: 0 2.3em; }

/* hero: slab photo fading into dark, text on top, expandable */
body.pg-about .ab-hero { margin-top: 3.6em; background: #111111; color: #FFFFFF; }
body.pg-about .ab-hero-in { max-width: 38em; margin: 0 auto; }
body.pg-about .ab-hero-media { position: relative; line-height: 0; }
body.pg-about .ab-hero-media img { display: block; width: 100%; height: auto; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%); }
body.pg-about .ab-hero-media::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 55%;
    background: linear-gradient(180deg, rgba(17,17,17,0) 0%, #111111 100%);
}
body.pg-about .ab-hero-text { position: relative; padding: 0 3.6em 2.3em; margin-top: -1.3em; text-align: center; z-index: 1; }
body.pg-about .ab-hero-text p { margin: 0; font-size: 1.05em; font-weight: 300; line-height: 1.45; text-align: center; }
body.pg-about .ab-hero-text p + p { margin-top: .9em; }
body.pg-about .ab-hero-text em { font-style: italic; }
body.pg-about .ab-hero-text strong { font-weight: 500; }
body.pg-about .ab-hero-text .pgx-expand { margin-top: 1.3em; color: rgba(255,255,255,.85); }
body.pg-about .ab-hero-text .pgx-more > div > p:first-child { margin-top: .9em; }

/* What We Do */
body.pg-about .ab-do { padding: 3.2em 0 3.6em; }
body.pg-about .ab-do h2 { font-size: 1.22em; margin: 0 0 2.2em; }
body.pg-about .ab-steps { list-style: none; margin: 0; padding: 0 0 0 1.9em; }
body.pg-about .ab-steps li { display: grid; grid-template-columns: 3.2em 1fr; column-gap: .15em; align-items: start; margin: 0 0 2.4em; }
body.pg-about .ab-steps li:last-child { margin-bottom: 0; }
body.pg-about .ab-num { font-family: var(--pg-desc); font-weight: 600; font-size: 2.9em; line-height: .95; text-align: center; }
body.pg-about .ab-steps p { margin: 0; font-size: 1.05em; line-height: 1.4; text-align: left; }
body.pg-about .ab-steps strong { font-weight: 500; }

/* Why choose */
body.pg-about .ab-why { background: #111111; color: var(--pg-gold); padding: 3.1em 0 3.4em; text-align: center; }
body.pg-about .ab-why-in { max-width: 38em; margin: 0 auto; padding: 0 2.6em; }
body.pg-about .ab-spark { display: block; height: 3.8em; width: auto; margin: 0 auto 1.4em; }
body.pg-about .ab-why h2 { font-size: 1.12em; text-align: center !important; margin: 0 0 1.1em; color: var(--pg-gold); }
body.pg-about .ab-why-lead { margin: 0 auto; max-width: 26em; font-size: 1.05em; font-weight: 300; line-height: 1.45; color: var(--pg-gold); }
body.pg-about .ab-why-lead strong { font-weight: 500; color: #DABB78; }
body.pg-about .ab-why-lead em { font-style: italic; }
body.pg-about .ab-feats { list-style: none; margin: 2.6em 0 0; padding: 0; display: flex; flex-direction: column; gap: 1.1em; }
body.pg-about .ab-feat {
    display: flex; align-items: center; gap: 1.55em; text-align: left;
    padding: 1.05em 1.5em 1.05em 1.55em; color: #111111;
    background: linear-gradient(100deg, #FBEDB4 0%, #F4DF8C 55%, #EDD36E 100%);
    border: 3px solid #000000; border-radius: .6em;
}
body.pg-about .ab-feat img { flex: none; width: 3em; height: 3em; object-fit: contain; }
body.pg-about .ab-feat h3 { margin: 0 0 .15em; font-size: 1.1em; line-height: 1.25; color: #111111; }
body.pg-about .ab-feat p { margin: 0; font-size: 1em; line-height: 1.35; color: #111111; }

/* ============================================================================
   PRE-GRADE (pre_grade.php)
   ============================================================================ */
body.pg-pregrade { color: var(--pg-ink); }
body.pg-pregrade .pg-lead { margin: 1.7em auto 0; max-width: 26em; padding: 0 2.3em; text-align: center; font-size: 1.05em; line-height: 1.5; }
body.pg-pregrade .pg-lead strong { font-weight: 500; }
body.pg-pregrade .pg-top { padding-bottom: 2.6em; }

body.pg-pregrade .pg-what { background: #2A2A2A; color: #E3B65F; padding: 2.7em 0 1.7em; }
body.pg-pregrade .pg-band-in { max-width: 38em; margin: 0 auto; padding: 0 2.3em; }
body.pg-pregrade .pg-what h2, body.pg-pregrade .pg-why h2, body.pg-pregrade .pg-how h2 { font-size: 1.22em; margin: 0; }
body.pg-pregrade .pg-what h2 { color: #E3B65F; }
body.pg-pregrade .pg-what-body { padding-left: 1.9em; margin-top: 1.1em; }
body.pg-pregrade .pg-what-body p { margin: 0; font-size: 1.07em; font-weight: 400; line-height: 1.6; text-align: left; }
body.pg-pregrade .pg-what-body .pgx-more > div > p:first-child { margin-top: .9em; }
body.pg-pregrade .pg-what-tog { display: flex; justify-content: flex-end; margin-top: .7em; color: #E3B65F; }

body.pg-pregrade .pg-why { background: var(--pg-yellow); padding: 3.1em 0 3.4em; }
body.pg-pregrade .pg-why-list { list-style: none; margin: 2.4em 0 0; padding: 0; display: flex; flex-direction: column; gap: 2em; }
body.pg-pregrade .pg-why-card {
    display: flex; align-items: center; gap: 1.7em; padding: 1.2em 1.4em 1.2em 1.5em;
    background: #FFFFFF; border: 3px solid #000000; border-radius: .75em; text-align: left;
}
body.pg-pregrade .pg-why-card img { flex: none; width: 3.1em; height: 3.1em; object-fit: contain; }
body.pg-pregrade .pg-why-card h3 { margin: 0 0 .25em; font-size: 1.1em; line-height: 1.25; color: #111111; }
body.pg-pregrade .pg-why-card p { margin: 0; font-size: 1em; line-height: 1.4; color: #111111; }

body.pg-pregrade .pg-how { padding: 3.2em 0 2.4em; }
body.pg-pregrade .pg-flow { list-style: none; margin: 2.8em 0 0; padding: 0 0 0 1.9em; }
body.pg-pregrade .pg-flow li { position: relative; display: grid; grid-template-columns: 4.1em 1fr; column-gap: 1.75em; align-items: start; padding-bottom: 3.8em; }
body.pg-pregrade .pg-flow li:last-child { padding-bottom: 0; }
body.pg-pregrade .pg-flow li:not(:last-child)::after {
    content: ""; position: absolute; left: calc(2.05em - 1px); top: 4.25em; bottom: .15em; width: 0;
    border-left: 2px dashed #111111;
}
body.pg-pregrade .pg-flow img { width: 4.1em; height: 4.1em; display: block; }
body.pg-pregrade .pg-flow h3 { margin: .2em 0 .35em; font-size: 1.15em; line-height: 1.25; }
body.pg-pregrade .pg-flow p { margin: 0; font-size: 1em; line-height: 1.4; text-align: left; }

body.pg-pregrade .pg-cta { max-width: 38em; margin: 0 auto; padding: 0 2.3em 3.4em; text-align: center; }
body.pg-pregrade .pg-cta .pgx-rule { margin: 0 0 2.4em; }
body.pg-pregrade .pg-cta p { margin: 0; font-size: 1.05em; line-height: 1.5; }
body.pg-pregrade .pg-cta p strong { font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
    .pgx-more, .pgx-expand svg { transition: none; }
}

/* CTA button = the same gold Pre-Grade plaque as the homepage hero (zoom + shine + 15% OFF sticker) */
body.pg-pregrade .pg-cta { --ink: #111111; --gold-grad: linear-gradient(115deg, #F0D894 0%, #C5A059 38%, #E9CE8A 52%, #B08A45 100%); }
body.pg-pregrade .pg-cta a.pregrade-link {
    position: relative; display: block; width: min(21em, 78%); margin: 2.4em auto 0; text-decoration: none;
    transform-origin: center; animation: rsl-pg-zoom 1.9s ease-in-out infinite; will-change: transform;
}
body.pg-pregrade .pg-cta a.pregrade-link:hover { animation-play-state: paused; transform: scale(1.06); }
@keyframes rsl-pg-zoom { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
body.pg-pregrade .pg-cta .btn-pregrade {
    width: 100%; max-width: none; margin: 0; padding: 16px 22px 14px; gap: 7px;
    background: var(--gold-grad); border: 1.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
    font-size: 13px; letter-spacing: 1.5px; line-height: 1.4;
}
body.pg-pregrade .pg-cta .btn-pregrade .pg-free { font-size: 12px; padding: 4px 16px; letter-spacing: 3px; }
body.pg-pregrade .pg-cta .btn-pregrade:hover { background: var(--gold-grad); filter: brightness(1.07); transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }
body.pg-pregrade .pg-cta .btn-pregrade:active { background: var(--gold-grad); transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
body.pg-pregrade .pg-cta .pg-sticker {
    position: absolute; top: -38px; right: -46px; width: 92px; height: 92px; z-index: 3;
    display: grid; place-items: center; pointer-events: none;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .3));
    animation: rsl-sticker 1.9s ease-in-out infinite;
}
body.pg-pregrade .pg-cta .pg-sticker svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: #EE2B2B; }
body.pg-pregrade .pg-cta .pg-sticker-text { position: relative; display: flex; flex-direction: column; align-items: center; line-height: 1; color: #fff; transform: rotate(-9deg); }
body.pg-pregrade .pg-cta .pg-sticker-text b { font-size: 25px; font-weight: 700; font-style: italic; letter-spacing: -1px; }
body.pg-pregrade .pg-cta .pg-sticker-text i { font-size: 10px; font-weight: 700; font-style: normal; letter-spacing: 1px; margin-top: 2px; }
@keyframes rsl-sticker { 0%, 100% { transform: rotate(10deg) scale(1); } 50% { transform: rotate(17deg) scale(1.1); } }
@media (max-width: 699px) {
    body.pg-pregrade .pg-cta a.pregrade-link { width: min(21em, 84%); }
    body.pg-pregrade .pg-cta .pg-sticker { width: 52px; height: 52px; top: -24px; right: -8px; }
    body.pg-pregrade .pg-cta .pg-sticker-text b { font-size: 15px; letter-spacing: -.5px; }
    body.pg-pregrade .pg-cta .pg-sticker-text i { font-size: 7px; margin-top: 1px; }
}
@media (prefers-reduced-motion: reduce) {
    body.pg-pregrade .pg-cta a.pregrade-link, body.pg-pregrade .pg-cta .pg-sticker { animation: none !important; }
}

/* ============================================================================
   ABOUT US — DESKTOP (>= 900px)
   - the black hero block now starts right under the navbar (title + intro in white)
   - What We Do and the Why-Choose cards are laid out horizontally; cards zoom on hover
   ============================================================================ */
@media (min-width: 900px) {
    body.pg-about .ab-top { background: #111111; color: #FFFFFF; }
    body.pg-about .ab-top .pgx-head h1 { color: #FFFFFF; }

    /* header intro: text block wider than the photo (photo keeps its 38em width and position) */
    body.pg-about .ab-hero-in { max-width: 64em; }
    body.pg-about .ab-hero-media { max-width: 38em; margin: 0 auto; }
    /* slab photo raised ~2.8em in total; the main paragraph ("...deserve an analytical deep dive.") stays exactly where it was */
    body.pg-about .ab-hero { margin-top: .8em; }
    body.pg-about .ab-hero-text { padding: 0 2.6em 2.3em; margin-top: 1.4em; }
    body.pg-about .ab-hero-text p { max-width: 58em; margin-left: auto; margin-right: auto; }

    /* What We Do: fixed 64em wide, same left/right edges as the Why-Choose cards, three equal columns */
    body.pg-about .ab-wrap { width: 64em; max-width: 100%; padding: 0 2.6em; }
    body.pg-about .ab-do h2 { margin-bottom: 2.4em; }
    body.pg-about .ab-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6em; padding: 0; }
    body.pg-about .ab-steps li { margin: 0; }

    body.pg-about .ab-why-in { max-width: 64em; }
    body.pg-about .ab-why-lead { max-width: 40em; }
    body.pg-about .ab-feats { flex-direction: row; gap: 1.6em; }
    body.pg-about .ab-feat { flex: 1 1 0; min-width: 0; transition: transform .25s ease, box-shadow .25s ease, filter .25s ease; }
}
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
    body.pg-about .ab-feat:hover { transform: translateY(-4px) scale(1.06); box-shadow: 0 16px 38px rgba(227, 182, 95, .38); filter: brightness(1.04); position: relative; z-index: 2; }
}

/* ============================================================================
   PRE-GRADE — DESKTOP (>= 900px)
   - wider header text; "What is" text and the Why-First cards spread horizontally
   - "How Submit" section keeps its original narrow layout
   ============================================================================ */
@media (min-width: 900px) {
    body.pg-pregrade .pg-lead { max-width: 52em; }
    body.pg-pregrade .pg-what .pg-band-in,
    body.pg-pregrade .pg-why .pg-band-in { max-width: 64em; }
    body.pg-pregrade .pg-what-body { padding-left: 0; }
    body.pg-pregrade .pg-what-body p { max-width: 58em; }
    body.pg-pregrade .pg-why-list { flex-direction: row; gap: 1.8em; align-items: stretch; }
    body.pg-pregrade .pg-why-card { flex: 1 1 0; min-width: 0; transition: transform .25s ease, box-shadow .25s ease; }
}
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
    body.pg-pregrade .pg-why-card:hover { transform: translate(-2px, -2px) scale(1.05); box-shadow: 8px 8px 0 #000000; position: relative; z-index: 2; }
}
@media (min-width: 900px) and (prefers-reduced-motion: reduce) {
    body.pg-about .ab-feat, body.pg-pregrade .pg-why-card { transition: none; }
}

/* ============================================================================
   OUR LAB (our_lab.php) — rebuilt from the mobile mockup "Our Lab.png"
   Order : cream title → macro GIF (dark vignette + text) → black gallery band
           (Macro 2-up, "expand more", // Graded Results, "expand more")
           → cream "Our Tech" title → NFC GIF (dark vignette + text)
           → black "// Take a Closer Look" + phone GIF + the 6 NFC feature cards.
   Desktop (>= 900px) keeps the same order; only the grids get wider.
   ============================================================================ */
body.pg-ourlab .ol-sub {
    margin: 1.6em auto 0; padding: 0 2.3em 2.7em; max-width: 40em;
    text-align: center; font-family: var(--pg-desc); font-size: 1.05em; font-weight: 400; font-style: normal; line-height: 1.5; color: var(--pg-ink);
}
body.pg-ourlab .ol-top-tech { padding-top: 3.4em; }
body.pg-ourlab .pgx-head .ol-h1 { text-align: center !important; font-size: 1.95em; line-height: 1.2; margin: 0; }

/* ---------- GIF + text on a dark vignette ---------- */
/* style.css gives every <section> padding + max-width 800px — the GIF band must be full-bleed */
body.pg-ourlab section.ol-hero { background: #000000; padding: 0; margin: 0; max-width: none; width: 100%; }
body.pg-ourlab .ol-media { position: relative; margin: 0; overflow: hidden; background: #000000; isolation: isolate; }
body.pg-ourlab .ol-media > img { display: block; width: 100%; height: auto; aspect-ratio: 1.15 / 1; object-fit: cover; }
body.pg-ourlab .ol-media-tech > img { aspect-ratio: 1 / 1; object-position: 50% 62%; }
/* vignette: soft dark edges + the text area (bottom) much darker than the top */
body.pg-ourlab .ol-media::after {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background:
        radial-gradient(ellipse at 50% 38%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, .5) 100%),
        linear-gradient(to bottom, rgba(0, 0, 0, .12) 0%, rgba(0, 0, 0, 0) 26%, rgba(0, 0, 0, .62) 56%, rgba(0, 0, 0, .93) 82%, #000000 100%);
}
body.pg-ourlab .ol-media figcaption {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
    margin: 0 auto; max-width: 34em; padding: 0 1.9em 2.7em; text-align: center; color: #FFFFFF;
    font-family: var(--pg-desc); font-size: 1.05em; font-weight: 300; line-height: 1.6; text-shadow: 0 1px 10px rgba(0, 0, 0, .6);
}

/* ---------- black gallery band ---------- */
body.pg-ourlab .ol-dark { background: #000000; color: #FFFFFF; padding: 3.2em 0 2.6em; }
body.pg-ourlab .ol-dark-gallery { padding-top: 2.6em; }
body.pg-ourlab .ol-wrap { max-width: 38em; margin: 0 auto; padding: 0 2.6em; }

/* gold "// " section titles */
body.pg-ourlab .gallery-group-title {
    font-family: var(--pg-head); font-size: 1.22em; font-weight: 700; letter-spacing: 0; line-height: 1.25;
    text-align: left; color: #DFB568; margin: 3.4em 0 1.5em;
}
body.pg-ourlab .gallery-group-title::before { content: "// "; }

/* galleries: 2 columns on mobile, gold framed tiles */
body.pg-ourlab .gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4em; }
body.pg-ourlab .gallery-item {
    all: unset; display: block; box-sizing: border-box; cursor: pointer; overflow: hidden;
    border: 3px solid #DFB568; border-radius: 6px; background: #111111;
    aspect-ratio: 1.16 / 1; transition: transform .25s ease, box-shadow .25s ease;
}
body.pg-ourlab .gallery-item img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
body.pg-ourlab .gallery-item:hover img,
body.pg-ourlab .gallery-item:focus-visible img { transform: scale(1.08); }
body.pg-ourlab .gallery-item:focus-visible { outline: 2px solid #DFB568; outline-offset: 3px; }

/* "expand more": only the first row shows until it is opened (mobile 2 tiles) */
body.pg-ourlab .gallery.ol-collapsed .gallery-item:nth-child(n+3) { display: none; }
body.pg-ourlab .ol-more-row { display: flex; justify-content: center; margin-top: 1.7em; }
body.pg-ourlab .ol-expand {
    display: inline-flex; align-items: center; gap: .55em; width: auto; margin: 0; padding: .3em .2em;
    background: none; border: 0; border-radius: 0; box-shadow: none; text-transform: none;
    font-family: var(--pg-desc); font-size: .95em; font-weight: 300; font-style: italic; letter-spacing: 0; line-height: 1.4;
    color: #FFFFFF; cursor: pointer; transition: opacity .2s ease;
}
body.pg-ourlab .ol-expand:hover { background: none; color: #FFFFFF; opacity: .75; }
body.pg-ourlab .ol-expand:focus-visible { outline: 2px solid #DFB568; outline-offset: 3px; }
body.pg-ourlab .ol-expand svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s ease; }
body.pg-ourlab .ol-expand[aria-expanded="true"] svg { transform: rotate(180deg); }

/* ---------- Take a Closer Look ---------- */
body.pg-ourlab .ol-dark-closer { padding: 3.2em 0 4.2em; }
body.pg-ourlab .ol-closer-title { margin-top: 0; }
body.pg-ourlab .ol-phone { display: block; width: 100%; height: auto; margin: 2.4em auto 0; background: #000000; }

/* the same 6 feature cards as the homepage NFC section */
body.pg-ourlab .ol-tiles { list-style: none; margin: 3em 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2em; }
body.pg-ourlab .ol-tiles .tile {
    margin: 0; padding: 1.4em 1.5em 1.5em; text-align: left; box-sizing: border-box;
    border: 2px solid rgba(197, 160, 89, .42); border-radius: 0; background: #181818; color: #FFFFFF;
    transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
body.pg-ourlab .ol-tiles .tile-ico { display: block; width: auto; height: 2.3em; margin: 0 0 1.1em; }
body.pg-ourlab .ol-tiles .tile h4 {
    margin: 0 0 .5em; font-family: var(--pg-head); font-size: .95em; font-weight: 700; line-height: 1.35;
    text-transform: uppercase; letter-spacing: .08em; color: #FEFBF3;
}
body.pg-ourlab .ol-tiles .tile p { margin: 0; font-family: var(--pg-desc); font-size: .95em; font-weight: 400; line-height: 1.5; color: rgba(255, 251, 243, .72); }

/* OUR LAB — DESKTOP (>= 900px): same order as mobile, wider grids */
@media (min-width: 640px) {
    body.pg-ourlab .ol-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
    body.pg-ourlab .ol-sub { padding-bottom: 3em; }
    body.pg-ourlab .ol-top-tech { padding-top: 4em; }
    body.pg-ourlab .ol-media { max-width: 64em; margin: 0 auto; }
    body.pg-ourlab .ol-media > img,
    body.pg-ourlab .ol-media-tech > img { aspect-ratio: 16 / 9; }
    body.pg-ourlab .ol-media-tech > img { object-position: 50% 58%; }
    /* fade the left/right edges into the black band so the GIF is not a hard box */
    body.pg-ourlab .ol-media::after {
        background:
            linear-gradient(to right, #000000 0%, rgba(0, 0, 0, 0) 14%, rgba(0, 0, 0, 0) 86%, #000000 100%),
            radial-gradient(ellipse at 50% 38%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, .45) 100%),
            linear-gradient(to bottom, rgba(0, 0, 0, .12) 0%, rgba(0, 0, 0, 0) 24%, rgba(0, 0, 0, .62) 54%, rgba(0, 0, 0, .93) 80%, #000000 100%);
    }
    body.pg-ourlab .ol-media figcaption { max-width: 40em; padding-bottom: 3.2em; font-size: 1.15em; }
    body.pg-ourlab .ol-dark { padding: 3.6em 0 3.2em; }
    body.pg-ourlab .ol-dark-gallery { padding-top: 3.2em; }
    body.pg-ourlab .ol-wrap { max-width: 64em; padding: 0 2.6em; }
    body.pg-ourlab .gallery { gap: 1.4em; }
    body.pg-ourlab #olMacro { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    body.pg-ourlab #olGraded { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    body.pg-ourlab #olMacro.ol-collapsed .gallery-item:nth-child(n+3) { display: block; }
    body.pg-ourlab #olMacro.ol-collapsed .gallery-item:nth-child(n+4) { display: none; }
    body.pg-ourlab #olGraded.ol-collapsed .gallery-item:nth-child(n+3) { display: block; }
    body.pg-ourlab #olGraded.ol-collapsed .gallery-item:nth-child(n+5) { display: none; }
    body.pg-ourlab .ol-dark-closer { padding: 3.6em 0 5em; }
    body.pg-ourlab .ol-phone { max-width: 32em; }
    body.pg-ourlab .ol-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1em; margin-top: 3.6em; }
}
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
    body.pg-ourlab .gallery-item:hover { transform: translateY(-3px); box-shadow: 0 .8em 1.8em rgba(223, 181, 104, .28); }
    body.pg-ourlab .ol-tiles .tile:hover { transform: translateY(-4px); border-color: #C5A059; background: #1f1c15; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
}
@media (prefers-reduced-motion: reduce) {
    body.pg-ourlab .gallery-item, body.pg-ourlab .gallery-item img, body.pg-ourlab .ol-tiles .tile, body.pg-ourlab .ol-expand svg { transition: none; }
}

/* ============================================================================
   FAQ (faq.php) — title + rule, accordion cards in the same style as the
   Pre-Grade / About Us cards (3px black border, rounded, offset shadow when open)
   ============================================================================ */
body.pg-faq .faq-list { max-width: 40em; margin: 0 auto; padding: 2.3em 2.3em 3.6em; }
body.pg-faq .faq-item {
    background: #FFFFFF; border: 3px solid #000000; border-radius: .75em;
    margin: 0 0 1.1em; padding: 0 1.3em; overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease, background-color .2s ease;
}
body.pg-faq .faq-item[open] { background: #FFFFFF; box-shadow: 4px 4px 0 #000000; }
body.pg-faq .faq-item summary {
    position: relative; padding: 1.05em 2em 1.05em 0; text-align: left; cursor: pointer; list-style: none;
    font-family: var(--pg-head); font-size: .93em; font-weight: 700; line-height: 1.4; color: #111111;
}
body.pg-faq .faq-item summary::-webkit-details-marker { display: none; }
body.pg-faq .faq-item summary::after {
    content: "+"; position: absolute; right: 0; top: .72em; font-family: var(--pg-head);
    font-size: 1.5em; font-weight: 500; line-height: 1; color: #C5A059;
}
body.pg-faq .faq-item[open] summary::after { content: "\2212"; }
body.pg-faq .faq-item summary:focus-visible { outline: 2px solid #111111; outline-offset: 3px; border-radius: 4px; }
body.pg-faq .faq-item p {
    margin: 0; padding: 0 0 1.3em; text-align: left;
    font-family: var(--pg-desc); font-size: 1em; font-weight: 400; line-height: 1.55; color: #333333;
}
@media (min-width: 900px) {
    body.pg-faq .faq-list { max-width: 46em; padding-top: 2.6em; }
    body.pg-faq .faq-item { padding: 0 1.6em; }
    body.pg-faq .faq-item summary { font-size: 1em; }
}
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
    body.pg-faq .faq-item:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 #000000; }
    body.pg-faq .faq-item[open]:hover { box-shadow: 6px 6px 0 #000000; }
}
@media (prefers-reduced-motion: reduce) { body.pg-faq .faq-item { transition: none; } }
