/*
 * Guest info pages: about, contact, login, register, the four reading pages
 * (rules, terms, privacy, cookies) and the blog. Loaded after home.css on those
 * routes only (header.blade.php $infoPage); the page wraps in main.ph.pg, so
 * home.css's tokens, legacy override, buttons and reduced-motion block apply.
 *
 * pf-  the floor plan (frontend/common/floor-plan.blade.php): the saloon from above
 * pg-  shared page parts      pa-  sign-in sheets      pc-  contact
 * pl-  reading pages          pb-  blog      pa--recover  forgot password
 */

:root {
    --pg-error: #a3123f;
    --pg-ok-ground: #e8f7ee;
    --pg-ok-ink: #14532d;
    --pg-floor: #170a55;
    --pg-taken: var(--ph-on-dark-soft);
    --pg-floor-glow: #2a1384;
    --pg-sheen: #3b1aa6;
    --pg-table-closed: #24166b;
    --pg-placeholder: #7d78a0;
    --pg-field-hover: #cfc8ea;
    --pg-error-ground: #fff6f8;
    --pg-alert-ground: #fdecef;
    --pg-caps: #8a5a00;
}

/* ── Page frame ─────────────────────────────────────────────────────────── */

/* Legacy body { overflow-x: hidden } makes the body a scroll container and breaks sticky parts. */
body.ps-home { overflow-x: clip; }

.pg { padding-top: 76px; min-height: 70vh; }
@media (max-width: 575px) { .pg { padding-top: 64px; } }

.pg .ph-section { position: relative; }

.pg-title {
    margin: 0 0 22px;
    color: var(--ph-on-dark);
    font-size: clamp(2.6rem, 1.4rem + 3vw, 4rem);
    font-weight: 700;
    line-height: .95;
    letter-spacing: -.02em;
    text-wrap: balance;
}
.pg-title--sm { font-size: clamp(2.4rem, 1.3rem + 3.4vw, 4.2rem); }
.pg-title__line { display: block; animation: ph-rise .9s var(--ph-ease) both; }
.pg-title__line:nth-child(2) { animation-delay: .08s; }
.pg-title__line:nth-child(3) { animation-delay: .16s; }
.pg-title em, .pa-side__title em { color: var(--ph-magenta-on-dark); font-style: normal; }

.ph .pg-lead {
    margin: 0 0 28px;
    max-width: 54ch;
    color: var(--ph-on-dark-soft) !important;
    font-size: 1.12rem;
    line-height: 1.6;
    animation: ph-fade .8s .2s ease both;
}

.pg-magenta { color: var(--ph-magenta-on-dark); }

.ph .pg-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin: 30px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--ph-on-dark-line);
    color: var(--ph-on-dark-soft) !important;
    font-size: .95rem;
}
.pg-proof b { color: var(--ph-on-dark); font-size: 1.35rem; font-weight: 700; margin-right: 4px; }
.pg-proof b.pg-magenta { color: var(--ph-magenta-on-dark); }

.ph .pg-hint { margin: 10px 0 0; color: var(--ph-on-dark-soft) !important; font-size: .85rem; opacity: .8; }
@media (hover: none) { .ph .pg-hint { display: none; } }

/* A light button for white sheets. */
.ph-btn--light { background: var(--ph-surface); border-color: var(--ph-line); color: var(--ph-ink); }
.ph-btn--light:hover { background: var(--ph-wash); color: var(--ph-ink); }

/* Chips: the small pill toggles of these pages (view switch, topics, print). */
button.pf-chip, .pf-chip {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    margin: 0;
    padding: 0 16px;
    border: 1px solid color-mix(in srgb, var(--ph-on-dark-soft) 40%, transparent);
    border-radius: 999px;
    background: transparent;
    color: var(--ph-on-dark);
    font: 600 .85rem/1 var(--ph-font);
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s var(--ph-ease);
}
.pf-chip:hover { border-color: var(--ph-on-dark); }
.pf-chip:active { transform: scale(.96); }
.pf-chip[aria-pressed="true"] { background: var(--ph-on-dark); border-color: var(--ph-on-dark); color: var(--ph-ink); }

.pf-link {
    color: var(--ph-on-dark-soft);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--ph-on-dark-soft) 40%, transparent);
    text-underline-offset: 4px;
}
.pf-link:hover { color: var(--ph-on-dark); }

/* Sections fade up as they scroll in, where the browser can time it to scroll. */
@supports (animation-timeline: view()) {
    .pg [data-reveal] {
        animation: ph-fade-up linear both;
        animation-timeline: view();
        animation-range: entry 0% cover 28%;
    }
}

/* ── The floor plan ─────────────────────────────────────────────────────── *
 * An isometric room on a perspective stage. The room's tilt lives in --rx/--rz
 * (dragged, or flattened by the god's-eye view), the camera's focus in
 * --zoom/--fx/--fy. Labels undo the room's rotation so they stand up facing
 * the viewer. Only transforms and opacity move.
 */

.pf { position: relative; }

.pf-stage {
    position: relative;
    aspect-ratio: 4 / 3;
    perspective: 2400px;
    perspective-origin: 50% 30%;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    cursor: grab;
    isolation: isolate;
    /* The camera's frame: a zoomed room never spills over the page. */
    overflow: clip;
    border-radius: 24px;
}
.pf-stage::before {
    content: "";
    position: absolute;
    inset: 4% 0 0;
    z-index: -1;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--ph-indigo-bright) 50%, transparent), transparent 75%);
    filter: blur(10px);
}
.pf.is-dragging .pf-stage { cursor: grabbing; }

.pf-room {
    --rx: 55deg;
    --rz: -34deg;
    --zoom: 1;
    --fx: 0%;
    --fy: 0%;
    --tw: clamp(60px, 8.6vw, 128px);
    position: absolute;
    inset: 15% 8% 9%;
    border: 1px solid color-mix(in srgb, var(--ph-on-dark-soft) 30%, transparent);
    border-radius: 22px;
    background:
        linear-gradient(color-mix(in srgb, var(--ph-on-dark-soft) 7%, transparent) 1px, transparent 1px) 0 0 / 8.333% 10%,
        linear-gradient(90deg, color-mix(in srgb, var(--ph-on-dark-soft) 7%, transparent) 1px, transparent 1px) 0 0 / 8.333% 10%,
        radial-gradient(120% 90% at 50% 0%, var(--pg-floor-glow), var(--pg-floor) 70%);
    box-shadow: 0 60px 70px -40px color-mix(in srgb, var(--ph-shade) 95%, transparent), inset 0 0 0 6px color-mix(in srgb, var(--ph-ground-deep) 35%, transparent);
    transform-style: preserve-3d;
    transform: rotateX(var(--rx)) rotateZ(var(--rz)) scale(var(--zoom)) translate(var(--fx), var(--fy));
    transition: transform 1s var(--ph-ease);
    animation: pf-arrive 1.3s var(--ph-ease) both;
}
.pf.is-dragging .pf-room { transition: none; }
.pf.is-overhead .pf-room { --rx: 0deg; --rz: 0deg; }

/* The bar along the back wall, the door in the front one. */
.pf-bar {
    position: absolute;
    left: 18%;
    right: 18%;
    top: 3%;
    height: 5%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--pg-sheen), var(--ph-indigo-bright), var(--pg-sheen));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--ph-on-dark-soft) 30%, transparent), 0 0 22px color-mix(in srgb, var(--ph-magenta-on-dark) 45%, transparent);
    transform: translateZ(10px);
    transform-style: preserve-3d;
}
.pf-bar::after {
    content: "";
    position: absolute;
    inset: auto 6% -3px;
    height: 2px;
    border-radius: 2px;
    background: var(--ph-magenta-on-dark);
    animation: pf-breathe 4s ease-in-out infinite;
}
.pf-door {
    position: absolute;
    left: 50%;
    bottom: -2px;
    width: 16%;
    height: 4px;
    translate: -50% 0;
    border-radius: 4px;
    background: var(--ph-amber);
    box-shadow: 0 0 18px color-mix(in srgb, var(--ph-amber) 70%, transparent);
    transform-style: preserve-3d;
}

/* Billboards: undo the room's turn and tilt so text faces the viewer. */
.pf-tag, .pf-label {
    position: absolute;
    left: 50%;
    top: 50%;
    pointer-events: none;
    white-space: nowrap;
    transform: translateZ(18px) rotateZ(calc(var(--rz) * -1)) rotateX(calc(var(--rx) * -1)) translate(-50%, -100%);
    transition: transform 1s var(--ph-ease);
}
.pf.is-dragging :is(.pf-tag, .pf-label) { transition: none; }
.ph .pf-tag {
    padding: 3px 8px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--ph-ground-deep) 80%, transparent);
    color: var(--ph-on-dark-soft) !important;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.ph .pf-tag--you { background: var(--ph-amber); color: var(--ph-ink) !important; }

/* A table: felt, chairs around it, its name standing over it. */
button.pf-table, .pf-table {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--tw);
    height: var(--tw);
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    translate: -50% -50%;
    transform-style: preserve-3d;
    animation: pf-deal .7s var(--ph-ease) both;
    animation-delay: calc(.35s + var(--i) * .06s);
}
button.pf-table { cursor: pointer; }
button.pf-table:focus-visible { outline: none; }
button.pf-table:focus-visible .pf-felt { outline: 3px solid var(--ph-amber); outline-offset: 4px; }

.pf-felt {
    position: absolute;
    inset: 16%;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, var(--ph-indigo-bright), var(--ph-indigo-deep) 75%);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ph-on-dark-soft) 35%, transparent), 0 10px 18px -6px color-mix(in srgb, var(--ph-shade) 90%, transparent);
    transform: translateZ(4px);
    transition: transform .45s var(--ph-ease), box-shadow .3s ease;
}
.pf-table:hover .pf-felt { transform: translateZ(14px); }
.pf-table.is-picked .pf-felt {
    transform: translateZ(16px);
    box-shadow: 0 0 0 2px var(--ph-magenta-on-dark), 0 0 28px color-mix(in srgb, var(--ph-magenta-on-dark) 55%, transparent), 0 14px 22px -8px color-mix(in srgb, var(--ph-shade) 90%, transparent);
}
.pf-table.is-closed .pf-felt { background: var(--pg-table-closed); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ph-on-dark-soft) 20%, transparent); }
.pf-table.is-closed .pf-seat { opacity: .35; }

.pf-seat {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 15%;
    height: 15%;
    margin: -7.5% 0 0 -7.5%;
    border-radius: 50%;
    border: 2px solid color-mix(in srgb, var(--ph-on-dark-soft) 70%, transparent);
    background: var(--pg-floor);
    transform: rotate(var(--a)) translateX(calc(var(--tw) * .47)) translateZ(3px);
}
.pf-seat.is-taken { border-color: var(--pg-taken); background: var(--pg-taken); }
.pf-seat.is-next {
    border-color: var(--ph-amber);
    background: color-mix(in srgb, var(--ph-amber) 25%, transparent);
    animation: pf-seat 2.2s ease-out infinite;
}

.pf-label { display: grid; justify-items: center; gap: 1px; transform: translateZ(calc(var(--tw) * .42)) rotateZ(calc(var(--rz) * -1)) rotateX(calc(var(--rx) * -1)) translate(-50%, -100%); }
.ph .pf-label b {
    padding: 4px 9px;
    border-radius: 7px;
    background: color-mix(in srgb, var(--ph-ground-deep) 86%, transparent);
    color: var(--ph-on-dark) !important;
    font-size: clamp(.9rem, .72rem + .45vw, 1.2rem);
    font-weight: 700;
    letter-spacing: .02em;
}
.ph .pf-label small { color: var(--ph-on-dark-soft) !important; font-size: .86rem; font-weight: 600; text-shadow: 0 1px 4px color-mix(in srgb, var(--ph-shade) 90%, transparent); }
.pf-table.is-picked .pf-label b { background: var(--ph-magenta); }

/* Players on the floor: each a dot looping through four points of the room. */
.pf-walker {
    position: absolute;
    inset: 0;
    pointer-events: none;
    translate: var(--x0) var(--y0);
    transform-style: preserve-3d;
    animation: pf-walk var(--dur) linear var(--delay) infinite;
}
.pf-walker::before {
    content: "";
    position: absolute;
    left: -4px;
    top: -4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ph-surface);
    box-shadow: 0 0 10px 2px color-mix(in srgb, var(--ph-on-dark-soft) 80%, transparent);
    transform: translateZ(3px);
}

/* You, at the door; register and login walk you to a table (guest.js). */
.pf-you {
    position: absolute;
    inset: 0;
    pointer-events: none;
    translate: var(--you-x, 50%) var(--you-y, 96%);
    transform-style: preserve-3d;
    transition: translate 1.6s var(--ph-ease);
}
.pf-you::before {
    content: "";
    position: absolute;
    left: -7px;
    top: -7px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--ph-amber);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--ph-amber) 30%, transparent), 0 0 22px color-mix(in srgb, var(--ph-amber) 90%, transparent);
    transform: translateZ(5px);
    animation: pf-you 2s ease-out infinite;
}
.pf-you .pf-tag { left: 0; top: 0; transform: translateZ(26px) rotateZ(calc(var(--rz) * -1)) rotateX(calc(var(--rx) * -1)) translate(-50%, -100%); }
.pf--full .pf-you { display: none; }
.pf-door .pf-tag { transform: translateZ(4px) rotateZ(calc(var(--rz) * -1)) rotateX(calc(var(--rx) * -1)) translate(-50%, 30%); }
.pf-bar .pf-tag { transform: translateZ(12px) rotateZ(calc(var(--rz) * -1)) rotateX(calc(var(--rx) * -1)) translate(-50%, -120%); }

/* Read-out under the stage. */
.pf-hud {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin-top: 6px;
}
.ph .pf-hud__live {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin: 0;
    color: var(--ph-on-dark-soft) !important;
    font-size: .9rem;
    font-weight: 600;
}
.pf-hud__live .ph-clock { color: var(--ph-amber); font-weight: 700; }
.pf-hud__sep { opacity: .5; }
.pf-hud__tools { display: flex; gap: 8px; }

/* The picked table's next seat: the page's one indigo panel. */
.pf-panels { margin-top: 18px; }
.pf-panel {
    position: relative;
    padding: 22px 24px;
    border-radius: 20px;
    background: linear-gradient(160deg, var(--ph-indigo-bright), var(--ph-indigo-deep));
    box-shadow: var(--ph-shadow);
    animation: ph-deal .5s var(--ph-ease) both;
}
.pf-panel[hidden] { display: none; }
.ph .pf-panel__note { margin: 0 0 16px; color: var(--ph-on-dark-soft) !important; }
.pf-panel__title, .ph .pf-panel__title { margin: 0 0 16px; text-wrap: balance; color: var(--ph-on-dark) !important; font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.pf-panel__terms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
    margin: 0 0 18px;
}
.pf-panel__terms div { min-width: 0; }
.pf-panel__terms dt { color: var(--ph-on-dark-soft); font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.pf-panel__terms dd { margin: 2px 0 0; color: var(--ph-on-dark); font-size: 1.05rem; font-weight: 700; }
.pf-panel__terms .ph-clock { color: var(--ph-amber); }
.pf-prize { color: var(--ph-magenta-on-dark) !important; }
.pf-panel__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }

/* Compact (login, register): a picture with a one-line readout. */
.pf--compact .pf-stage { cursor: default; }
.pf--compact .pf-room { --tw: clamp(40px, 5.4vw, 80px); inset: 12% 12% 16%; }
/* The compact floors look straight down (god's-eye): names stay readable at that size. */
.pf--compact .pf-room, .pf--compact.pf .pf-room { --rx: 0deg; --rz: 0deg; }
.pf--compact .pf-stage { aspect-ratio: 16 / 10; }
.pf--compact .pf-label small { display: none; }
.ph .pf--compact .pf-label b { font-size: .82rem; }

@keyframes pf-arrive { from { opacity: 0; transform: rotateX(70deg) rotateZ(-48deg) scale(.82); } }
@keyframes pf-deal { from { opacity: 0; translate: -50% -80%; } }
@keyframes pf-walk {
    0%, 100% { translate: var(--x0) var(--y0); }
    25% { translate: var(--x1) var(--y1); }
    50% { translate: var(--x2) var(--y2); }
    75% { translate: var(--x3) var(--y3); }
}
@keyframes pf-seat { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ph-amber) 70%, transparent); } 100% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--ph-amber) 0%, transparent); } }
@keyframes pf-you { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ph-amber) 70%, transparent), 0 0 22px color-mix(in srgb, var(--ph-amber) 90%, transparent); } 100% { box-shadow: 0 0 0 14px color-mix(in srgb, var(--ph-amber) 0%, transparent), 0 0 22px color-mix(in srgb, var(--ph-amber) 90%, transparent); } }
@keyframes pf-breathe { 50% { opacity: .35; } }

/* Off screen or in a hidden tab, the floor stops. */
.pf.is-idle *, .pf.is-idle *::before, .pf.is-idle *::after { animation-play-state: paused !important; }

@media (max-width: 767px) {
    .pf-room { --rx: 50deg; --rz: -26deg; --tw: clamp(46px, 13vw, 76px); inset: 12% 8% 16%; }
    .pf--compact .pf-room { --tw: clamp(36px, 10vw, 60px); --rx: 0deg; --rz: 0deg; }
    .pf-stage { aspect-ratio: 6 / 5; }
    .pf--compact .pf-stage { aspect-ratio: 16 / 10; }
}

/* ── About ──────────────────────────────────────────────────────────────── */

.pg-open { position: relative; padding-block: clamp(20px, 3vw, 40px) clamp(48px, 6vw, 88px); }
.pg-open__copy { padding-top: clamp(0px, 4vw, 64px); }
.pg-open::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(60% 70% at 85% 30%, color-mix(in srgb, var(--ph-indigo-bright) 35%, transparent), transparent 70%);
    pointer-events: none;
}
.pg-open__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    align-items: start;
    gap: clamp(28px, 4vw, 64px);
}
.pg-open__floor { scroll-margin-top: 88px; }

/* House rules: a hairline ledger, not cards. */
.pg-house__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 clamp(24px, 4vw, 64px);
    margin: 0;
    padding: 0;
    list-style: none;
}
.pg-rule {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 6px 18px;
    padding: 28px 0;
    border-top: 1px solid var(--ph-on-dark-line);
}
.pg-rule__mark { grid-row: span 2; color: var(--ph-amber); padding-top: 2px; }
.pg-rule h3 { margin: 0; color: var(--ph-on-dark); font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; }
.ph .pg-rule p { margin: 0; color: var(--ph-on-dark-soft) !important; font-size: 1.02rem; line-height: 1.6; }

.pg-who { background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--ph-indigo-deep) 55%, transparent) 45%, transparent); }
.pg-who__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px clamp(32px, 6vw, 96px); align-items: start; }
.ph .pg-who__text p { margin: 0 0 18px; color: var(--ph-on-dark-soft) !important; font-size: 1.12rem; line-height: 1.65; max-width: 60ch; }
.pg-reach { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.ph .pg-reach li {
    padding: 8px 16px;
    border: 1px solid color-mix(in srgb, var(--ph-on-dark-soft) 35%, transparent);
    border-radius: 999px;
    color: var(--ph-on-dark) !important;
    font-size: .88rem;
    font-weight: 600;
}

/* The game shelf: covers on a scroll-snapped row, inset to the page column. */
.pg-shelf {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: min(250px, 62vw);
    gap: 16px;
    margin: 0;
    padding: 4px var(--ph-gutter) 18px;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--ph-gutter);
    scrollbar-width: thin;
}
@media (min-width: 1368px) { .pg-shelf { padding-inline: calc((100vw - 1240px) / 2 + var(--ph-gutter)); scroll-padding-inline: calc((100vw - 1240px) / 2 + var(--ph-gutter)); } }
.pg-cover { scroll-snap-align: start; }
.pg-cover a {
    position: relative;
    display: grid;
    place-items: end start;
    aspect-ratio: 5 / 3;
    overflow: hidden;
    border-radius: var(--ph-radius);
    background: linear-gradient(160deg, var(--pg-floor-glow), var(--ph-indigo-deep));
    box-shadow: 0 0 0 1px var(--ph-on-dark-line);
    text-decoration: none;
    transition: transform .4s var(--ph-ease), box-shadow .3s ease;
}
.pg-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: scale .6s var(--ph-ease); }
.pg-cover a::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, color-mix(in srgb, var(--ph-ground-deep) 90%, transparent)); }
.ph .pg-cover span { position: relative; z-index: 1; padding: 12px 14px; color: var(--ph-on-dark) !important; font-weight: 700; }
.pg-cover a:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--ph-magenta-on-dark), var(--ph-shadow); }
.pg-cover a:hover img { scale: 1.06; }

/* ── Sign-in sheets (login, register) and the contact form ──────────────── */

.pa { padding-bottom: clamp(48px, 7vw, 96px); }
.pa-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(28px, 4vw, 64px);
    padding-top: clamp(28px, 4vw, 56px);
}
.pa-side { position: sticky; top: 90px; }
.pa-side__title {
    margin: 0 0 8px;
    color: var(--ph-on-dark);
    font-size: clamp(2rem, 1.2rem + 2.6vw, 3.4rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.02em;
}
.pa-side__title span, .pa-side__title em { display: block; animation: ph-rise .9s var(--ph-ease) both; }
.pa-side__title em { animation-delay: .08s; }

.pa-quote { margin: 18px 0 0; min-height: 5.5em; }
.pa-quote__item { margin: 0; animation: ph-fade .6s ease both; }
.ph .pa-quote__item p { margin: 0 0 6px; color: var(--ph-on-dark) !important; font-size: 1.05rem; line-height: 1.5; }
.pa-quote__item p::before { content: "“"; color: var(--ph-magenta-on-dark); font-weight: 700; margin-right: 2px; }
.pa-quote__item footer { color: var(--ph-on-dark-soft); font-size: .85rem; font-weight: 600; }

.pa-perks { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.ph .pa-perks li { position: relative; padding-left: 26px; color: var(--ph-on-dark-soft) !important; font-size: .98rem; }
.pa-perks li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: .45em;
    width: 12px;
    height: 7px;
    border: solid var(--ph-amber);
    border-width: 0 0 2px 2px;
    rotate: -45deg;
}

/* The white sheet. */
.pa-sheet {
    padding: clamp(24px, 4vw, 44px);
    border-radius: 22px;
    background: var(--ph-surface);
    color: var(--ph-ink);
    box-shadow: var(--ph-shadow), 0 0 0 1px color-mix(in srgb, var(--ph-on-dark) 6%, transparent);
    animation: ph-deal .7s .1s var(--ph-ease) both;
}
.pa-title { margin: 0 0 6px; color: var(--ph-ink); font-size: clamp(1.8rem, 1.3rem + 1.4vw, 2.4rem); font-weight: 700; letter-spacing: -.015em; }
.ph .pa-sheet .pa-lead { margin: 0 0 24px; color: var(--ph-ink-soft) !important; font-size: 1rem; line-height: 1.55; }
.ph .pa-switch { margin: 22px 0 0; color: var(--ph-ink-soft) !important; text-align: center; }
.pa-switch a, .pa-check a, .pa-small-link { color: var(--ph-indigo); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.pa-switch a:hover, .pa-check a:hover, .pa-small-link:hover { color: var(--ph-magenta); }
.pa-small-link { font-size: .82rem; font-weight: 600; }

.pa-form { display: grid; gap: 16px; }
.pa-field { display: grid; gap: 6px; min-width: 0; }
.pa-field__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pa-field__row--2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.pa-sheet label, .pa-sheet legend {
    margin: 0;
    padding: 0;
    color: var(--ph-ink-soft);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.ph .pa-optional { color: var(--ph-ink-soft) !important; font-weight: 500; letter-spacing: 0; text-transform: none; opacity: .8; }

.pa-sheet :is(input[type="text"], input[type="email"], input[type="password"], input[type="tel"], select, textarea) {
    width: 100%;
    min-height: 50px;
    margin: 0;
    padding: 12px 16px;
    border: 1px solid var(--ph-line);
    border-radius: 12px;
    background: var(--ph-wash);
    color: var(--ph-ink);
    font: 500 1rem/1.4 var(--ph-font);
    box-shadow: none;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.pa-sheet textarea { min-height: 150px; resize: vertical; }
.pa-sheet select {
    appearance: none;
    padding-right: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234a4470' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}
.pa-sheet :is(input, select, textarea)::placeholder { color: var(--pg-placeholder); }
.pa-sheet :is(input, select, textarea):hover { border-color: var(--pg-field-hover); }
.pa-sheet :is(input, select, textarea):focus { border-color: var(--ph-indigo); background-color: var(--ph-surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ph-indigo) 12%, transparent); outline: none; }
.pa-sheet :is(input, select, textarea)[aria-invalid="true"] { border-color: var(--pg-error); background-color: var(--pg-error-ground); }

.pa-pass { position: relative; }
.pa-pass input { padding-right: 52px; }
button.pa-eye {
    position: absolute;
    right: 4px;
    top: 50%;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    translate: 0 -50%;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ph-ink-soft);
    cursor: pointer;
}
button.pa-eye:hover { color: var(--ph-indigo); background: color-mix(in srgb, var(--ph-indigo) 6%, transparent); }
button.pa-eye[aria-pressed="true"] { color: var(--ph-magenta); }

.ph .pa-error { margin: 0; color: var(--pg-error) !important; font-size: .86rem; font-weight: 600; }
.ph .pa-error:empty { display: none; }
.ph .pa-hint, .ph .pa-caps { margin: 0; color: var(--ph-ink-soft) !important; font-size: .82rem; }
.ph .pa-caps { color: var(--pg-caps) !important; font-weight: 600; }

.pa-check {
    display: grid !important;
    grid-template-columns: 22px 1fr;
    gap: 12px;
    align-items: start;
    cursor: pointer;
}
.pa-sheet .pa-check { color: var(--ph-ink); font-size: .95rem; font-weight: 500; letter-spacing: 0; text-transform: none; line-height: 1.45; }
.pa-check input[type="checkbox"] {
    appearance: auto !important;
    -webkit-appearance: checkbox !important;
    position: static !important;
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    margin: 1px 0 0 !important;
    opacity: 1 !important;
    accent-color: var(--ph-magenta);
    cursor: pointer;
}
.pa-check.is-invalid span { color: var(--pg-error); }

.pa-alert { padding: 14px 16px; border-radius: 12px; font-size: .95rem; font-weight: 600; margin-bottom: 18px; }
.pa-alert ul { margin: 0; padding-left: 18px; }
.ph .pa-alert--error, .ph .pa-alert--error :is(p, li, span) { background: var(--pg-alert-ground); color: var(--pg-error) !important; }
.ph .pa-alert--error p { margin: 0; background: none; }
.ph .pa-alert--ok { background: var(--pg-ok-ground); color: var(--pg-ok-ink) !important; }

.ph-btn.pa-submit { width: 100%; margin-top: 4px; }
.ph-btn.is-busy { opacity: .7; cursor: progress; }
.pa-sheet .ph-btn--ghost { border-color: var(--ph-line); color: var(--ph-ink); }
.pa-sheet .ph-btn--ghost:hover { border-color: var(--ph-ink); background: var(--ph-wash); color: var(--ph-ink); }

/* Register: three steps (guest.js); without it the steps are one long form. */
.pa-step { display: grid; gap: 16px; min-width: 0; margin: 0; padding: 0; border: 0; }
.pa-step + .pa-step { margin-top: 18px; padding-top: 22px; border-top: 1px solid var(--ph-line); }
.pa-sheet .pa-step__legend { float: left; width: 100%; margin-bottom: 0; color: var(--ph-ink); font-size: 1.05rem; font-weight: 700; letter-spacing: 0; text-transform: none; }
.pa-step__legend + * { clear: both; }
.ph .pa-step__hint { margin: -4px 0 0; color: var(--ph-ink-soft) !important; font-size: .9rem; }
.pa-nav { display: flex; gap: 12px; margin-top: 6px; }
.pa-nav .ph-btn { flex: 1; }
.pa-nav .ph-btn--ghost { flex: 0 0 auto; }
.pa-nav .pa-submit { width: auto; margin: 0; }

/* Without JS the steps are one form: only the final submit shows. */
.pa-form:not(.is-stepped) .pa-nav :is([data-next], [data-back]) { display: none; }
.is-stepped .pa-step { display: none; }
.is-stepped .pa-step.is-current { display: grid; animation: pa-step-in .45s var(--ph-ease) both; }
.is-stepped .pa-step + .pa-step { margin-top: 0; padding-top: 0; border-top: 0; }
.is-stepped .pa-step.is-back { animation-name: pa-step-back; }
@keyframes pa-step-in { from { opacity: 0; translate: 28px 0; } }
@keyframes pa-step-back { from { opacity: 0; translate: -28px 0; } }

.pa-steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
    counter-reset: none;
}
.pa-steps::before, .pa-steps::after {
    content: "";
    position: absolute;
    left: 16.6%;
    right: 16.6%;
    top: 15px;
    height: 2px;
    background: var(--ph-line);
}
.pa-steps::after {
    right: auto;
    width: calc(66.8% * var(--done, 0) / 2);
    background: var(--ph-magenta);
    transition: width .6s var(--ph-ease);
}
.ph .pa-steps li {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 6px;
    color: var(--ph-ink-soft) !important;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.pa-steps li span {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 2px solid var(--ph-line);
    border-radius: 50%;
    background: var(--ph-surface);
    color: var(--ph-ink-soft);
    font-size: .9rem;
    transition: background-color .3s ease, border-color .3s ease, color .3s ease, scale .3s var(--ph-ease);
}
.pa-steps li.is-current span { border-color: var(--ph-magenta); color: var(--ph-magenta); scale: 1.1; }
.pa-steps li.is-done span { border-color: var(--ph-magenta); background: var(--ph-magenta); color: var(--ph-on-dark); }
.ph .pa-steps li.is-current, .ph .pa-steps li.is-done { color: var(--ph-ink) !important; }
.pa-steps li.is-done { cursor: pointer; }

.pa-meter { display: flex; align-items: center; gap: 10px; }
.pa-meter__bar { flex: 1; height: 6px; border-radius: 6px; background: var(--ph-line); overflow: hidden; }
.pa-meter__bar i { display: block; height: 100%; width: calc(var(--score, 0) * 25%); border-radius: inherit; background: var(--meter, var(--ph-line)); transition: width .35s var(--ph-ease), background-color .35s ease; }
.ph .pa-meter__text { flex: none; min-width: 9ch; color: var(--ph-ink-soft) !important; font-size: .8rem; font-weight: 600; text-align: right; }

.pa-captcha { max-width: 100%; }

/* ── Contact ───────────────────────────────────────────────────────────── */

.pc { padding-bottom: clamp(48px, 7vw, 96px); }
.pc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 80px); align-items: start; padding-top: clamp(28px, 5vw, 72px); }
.pc-lines { display: grid; gap: 0; margin: 0 0 32px; padding: 0; list-style: none; }
.pc-lines li { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px; padding: 16px 0; border-top: 1px solid var(--ph-on-dark-line); }
.pc-lines li:last-child { border-bottom: 1px solid var(--ph-on-dark-line); }
.pc-lines__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: color-mix(in srgb, var(--ph-on-dark-soft) 10%, transparent); color: var(--ph-amber); }
.ph .pc-lines small { display: block; color: var(--ph-on-dark-soft) !important; font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.pc-lines a { color: var(--ph-on-dark); font-size: 1.12rem; font-weight: 700; text-decoration: none; }
.pc-lines a:hover { color: var(--ph-magenta-on-dark); }
.pc-floor { margin: -8px 0 28px; }
.pc-tips { padding: 22px 24px; border: 1px dashed var(--ph-on-dark-line); border-radius: var(--ph-radius); }
.pc-tips__title { margin: 0 0 10px; color: var(--ph-on-dark); font-size: 1.05rem; font-weight: 700; }
.pc-tips ul { margin: 0 0 12px; padding-left: 18px; list-style: disc; }
.pc-tips li::marker { color: var(--ph-amber); }
.ph .pc-tips :is(li, p) { color: var(--ph-on-dark-soft) !important; font-size: .95rem; line-height: 1.55; }
.ph .pc-tips p { margin: 0; }

.pc-topics { margin: 0; padding: 0; border: 0; }
.pc-topics legend { margin-bottom: 8px; }
.pc-topics__list { display: flex; flex-wrap: wrap; gap: 8px; }
.pa-sheet button.pf-chip { border-color: var(--ph-line); color: var(--ph-ink); }
.pa-sheet button.pf-chip:hover { border-color: var(--ph-ink); }
.pa-sheet button.pf-chip[aria-pressed="true"] { background: var(--ph-ink); border-color: var(--ph-ink); color: var(--ph-on-dark); }
.pa-count { text-align: right; }

.pc-sent { display: grid; justify-items: start; gap: 6px; outline: none; }
.pc-sent__mark { color: var(--ph-magenta); margin-bottom: 8px; }
.pc-sent__mark circle { stroke-dasharray: 132; stroke-dashoffset: 132; animation: pc-draw .7s var(--ph-ease) forwards; }
.pc-sent__mark path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: pc-draw .45s .55s var(--ph-ease) forwards; }
.ph .pc-sent p { margin: 0 0 18px; color: var(--ph-ink-soft) !important; }
@keyframes pc-draw { to { stroke-dashoffset: 0; } }

/* ── Forgot password: locked out at the door ──────────────────────────── */

/* The way back in: three stops on a hairline; the current one is you (amber), done ones magenta. */
.pa-way { position: relative; display: grid; gap: 18px; margin: 22px 0 0; padding: 0; list-style: none; }
.pa-way::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 16px;
    bottom: 16px;
    width: 2px;
    background: var(--ph-on-dark-line);
}
.pa-way li {
    position: relative;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    column-gap: 14px;
    align-items: center;
    animation: ph-fade-up .6s var(--ph-ease) both;
    animation-delay: calc(.25s + var(--n, 0) * .08s);
}
.pa-way li:nth-child(2) { --n: 1; }
.pa-way li:nth-child(3) { --n: 2; }
.pa-way__dot {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 2px solid var(--ph-on-dark-line);
    border-radius: 50%;
    background: var(--pg-floor);
    color: var(--ph-on-dark-soft);
    font-size: .85rem;
    font-weight: 700;
    transition: background-color .4s var(--ph-ease), border-color .4s var(--ph-ease);
}
.pa-way b { color: var(--ph-on-dark); font-size: 1.02rem; font-weight: 700; }
.ph .pa-way small { color: var(--ph-on-dark-soft) !important; font-size: .9rem; line-height: 1.45; }
.pa-way li.is-current .pa-way__dot {
    border-color: var(--ph-amber);
    color: var(--ph-amber);
    animation: pa-way-ping 2.2s ease-out infinite;
}
.pa-way li.is-done .pa-way__dot { border-color: var(--ph-magenta); background: var(--ph-magenta); color: var(--ph-on-dark); }
.pa-way li:not(.is-current):not(.is-done) b { color: var(--ph-on-dark-soft); }
@keyframes pa-way-ping {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ph-amber) 55%, transparent); }
    100% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--ph-amber) 0%, transparent); }
}

/* The main event still taking players: the page's one indigo panel. */
.pa-waiting { margin-top: 26px; animation-delay: .45s; }
.pa-waiting::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--ph-magenta-on-dark) 18%, transparent), transparent 60%);
}
.pa-waiting > * { position: relative; z-index: 1; }

/* Locked: the door burns low. Sent: it opens wide and You steps in (guest.js). */
.pa--recover:not(.is-sent) .pf-door { animation: pa-door-locked 3s ease-in-out infinite; }
.pa--recover.is-sent .pf-door { animation: pa-door-open 1.2s .7s var(--ph-ease) both; width: 26%; }
@keyframes pa-door-locked { 50% { opacity: .45; box-shadow: 0 0 6px color-mix(in srgb, var(--ph-amber) 40%, transparent); } }
@keyframes pa-door-open {
    from { width: 16%; box-shadow: 0 0 18px color-mix(in srgb, var(--ph-amber) 70%, transparent); }
    40% { box-shadow: 0 0 46px 6px color-mix(in srgb, var(--ph-amber) 85%, transparent); }
}

/* Sent: the letter drops in, the flap folds shut, the seal stamps. */
.pa-sent { display: grid; justify-items: start; gap: 4px; outline: none; }
.pa-letter { margin: 0 0 14px; overflow: visible; }
.pa-letter__page { fill: var(--ph-surface); stroke: var(--ph-indigo); stroke-width: 2.5; animation: pa-letter-in .6s var(--ph-ease) both; }
.pa-letter__lines { stroke: var(--pg-field-hover); stroke-width: 3; animation: pa-letter-in .6s var(--ph-ease) both; }
.pa-letter__body { fill: var(--ph-wash); stroke: var(--ph-indigo); stroke-width: 2.5; }
.pa-letter__fold { stroke: var(--ph-indigo); stroke-width: 2; opacity: .5; }
.pa-letter__flap {
    fill: var(--ph-surface);
    stroke: var(--ph-indigo);
    stroke-width: 2.5;
    transform-box: fill-box;
    transform-origin: 50% 0;
    animation: pa-flap .5s .5s var(--ph-ease) both;
}
.pa-letter__seal { transform-box: fill-box; transform-origin: 50% 50%; animation: pa-seal .55s .95s cubic-bezier(.34, 1.56, .64, 1) both; }
.pa-letter__seal circle { fill: var(--ph-magenta); }
.pa-letter__seal path { stroke: var(--ph-on-dark); stroke-width: 3; stroke-dasharray: 20; animation: pa-tick .35s 1.3s var(--ph-ease) both; }
@keyframes pa-letter-in { from { translate: 0 -26px; opacity: 0; } }
@keyframes pa-flap { from { scale: 1 -1; } }
@keyframes pa-seal { from { scale: 0; opacity: 0; } }
@keyframes pa-tick { from { stroke-dashoffset: 20; } }
.ph .pa-sent .pa-lead { margin-bottom: 6px; }
.ph .pa-sent .pa-hint { margin: 0 0 20px; font-size: .92rem; line-height: 1.5; }
.pa-mail { width: 100%; }

/* Sending again sits behind a native disclosure; the server throttles regardless. */
.pa-again { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--ph-line); }
.pa-again summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    color: var(--ph-ink);
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}
.pa-again summary::-webkit-details-marker { display: none; }
.pa-again summary::after {
    content: "";
    width: 9px;
    height: 9px;
    border: solid var(--ph-ink-soft);
    border-width: 0 2px 2px 0;
    rotate: 45deg;
    translate: 0 -3px;
    transition: rotate .3s var(--ph-ease), translate .3s var(--ph-ease);
}
.pa-again[open] summary::after { rotate: -135deg; translate: 0 2px; }
.pa-again summary:hover { color: var(--ph-indigo); }
.pa-again[open] .pa-form { margin-top: 12px; animation: ph-fade-up .4s var(--ph-ease) both; }
.ph-btn.pa-submit[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }

/* A way in for someone who never had an account. */
.pa-new {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    margin: 22px 0 0;
    padding: 18px 20px;
    border-radius: 16px;
    background: var(--ph-wash);
}
.pa-new__copy { flex: 1 1 220px; display: grid; gap: 2px; }
.ph .pa-new b { color: var(--ph-ink); font-weight: 700; }
.ph .pa-new small { color: var(--ph-ink-soft) !important; font-size: .86rem; line-height: 1.45; }
.pa-new .ph-btn { flex: 0 0 auto; }
@media (max-width: 575px) {
    .pa-new .ph-btn, .pa-mail .ph-btn { flex: 1 1 100%; }
}

/* ── Reading pages (rules, terms, privacy, cookies) and stories ─────────── */

.pl-progress { position: fixed; inset: 0 0 auto; z-index: 1040; height: 3px; pointer-events: none; }
.pl-progress i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--ph-magenta-on-dark), var(--ph-amber));
    transform-origin: 0 50%;
    transform: scaleX(var(--read, 0));
}
@supports (animation-timeline: scroll()) {
    .pl-progress i { animation: pl-read linear both; animation-timeline: scroll(root); }
}
@keyframes pl-read { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.pl-head { padding: clamp(28px, 5vw, 64px) 0 clamp(28px, 4vw, 48px); }
.pl-docs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 28px; }
.pl-docs__link {
    padding: 9px 18px;
    border: 1px solid color-mix(in srgb, var(--ph-on-dark-soft) 30%, transparent);
    border-radius: 999px;
    color: var(--ph-on-dark-soft);
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.pl-docs__link:hover { border-color: var(--ph-on-dark); color: var(--ph-on-dark); }
.pl-docs__link[aria-current="page"] { background: var(--ph-on-dark); border-color: var(--ph-on-dark); color: var(--ph-ink); }
.pl-title { margin: 0 0 12px; color: var(--ph-on-dark); font-size: clamp(2.4rem, 1.3rem + 3.4vw, 4.2rem); font-weight: 700; line-height: 1; letter-spacing: -.02em; animation: ph-rise .9s var(--ph-ease) both; }
.ph .pl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; color: var(--ph-on-dark-soft) !important; font-size: .9rem; font-weight: 600; }
.pl-print { margin-left: 4px; }

.pl-body { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.pl-body:not(:has(.pl-toc:not([hidden]))) { grid-template-columns: minmax(0, 1fr); max-width: 980px; }

.pl-toc { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow: auto; scrollbar-width: thin; }
.pl-toc__title { margin: 0 0 12px; color: var(--ph-on-dark-soft); font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
button.pl-toc__title { display: none; }
.pl-toc__list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.pl-toc__list a {
    position: relative;
    display: block;
    padding: 7px 0 7px 14px;
    border-left: 2px solid var(--ph-on-dark-line);
    color: var(--ph-on-dark-soft);
    font-size: .88rem;
    font-weight: 500;
    line-height: 1.35;
    text-decoration: none;
    transition: color .15s ease, border-color .2s ease;
}
.pl-toc__list .is-sub a { padding-left: 26px; font-size: .82rem; }
.pl-toc__list a:hover { color: var(--ph-on-dark); }
.pl-toc__list a.is-active { border-left-color: var(--ph-amber); color: var(--ph-on-dark); font-weight: 700; }

.pl-sheet {
    min-width: 0;
    padding: clamp(24px, 5vw, 64px);
    border-radius: 22px;
    background: var(--ph-surface);
    box-shadow: var(--ph-shadow);
    animation: ph-deal .7s .1s var(--ph-ease) both;
}

/* Admin-written HTML (often pasted with inline fonts and colours): one voice. */
.pg-prose { color: var(--ph-ink-soft); font-size: 1.04rem; line-height: 1.75; overflow-wrap: break-word; }
.ph .pg-prose :is(p, li, span, font, b, strong, em, i, u, a, td, th, div) {
    font-family: var(--ph-font) !important;
    font-size: inherit !important;
    line-height: inherit !important;
    background: transparent !important;
}
.ph .pg-prose :is(p, li, span, font, td, div) { color: var(--ph-ink-soft) !important; }
.ph .pg-prose :is(b, strong) { color: var(--ph-ink) !important; font-weight: 700; }
.ph .pg-prose p { margin: 0 0 1.05em; max-width: 72ch; }
.pg-prose :is(h1, h2, h3, h4) {
    margin: 1.8em 0 .55em;
    color: var(--ph-ink) !important;
    font-family: var(--ph-font) !important;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.01em;
    text-transform: none;
    text-align: left !important;
    scroll-margin-top: 96px;
}
.pg-prose :is(h1, h2) { font-size: clamp(1.35rem, 1.1rem + .8vw, 1.75rem) !important; }
.pg-prose h3 { font-size: 1.2rem !important; }
.ph .pg-prose :is(.pl-h2, .pl-h3) { margin: 1.7em 0 .5em; line-height: 1.2 !important; }
.ph .pg-prose .pl-h2, .ph .pg-prose .pl-h2 * { color: var(--ph-ink) !important; font-size: clamp(1.3rem, 1.1rem + .7vw, 1.65rem) !important; font-weight: 700 !important; }
.ph .pg-prose .pl-h3, .ph .pg-prose .pl-h3 * { color: var(--ph-ink) !important; font-size: 1.15rem !important; font-weight: 700 !important; }
.ph .pg-prose :is(b, strong) * { font-weight: inherit !important; color: inherit !important; }
.pg-prose h4 { font-size: 1.05rem !important; }
.pg-prose > :first-child { margin-top: 0; }
.pg-prose .pl-anchor { scroll-margin-top: 96px; }
.pg-prose .pl-dup { display: none; }
.pg-prose :is(ul, ol) { margin: 0 0 1.1em; padding-left: 1.3em; max-width: 72ch; }
.ph .pg-prose li { margin-bottom: .4em; }
.pg-prose li::marker { color: var(--ph-indigo); }
.ph .pg-prose a { color: var(--ph-indigo) !important; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.ph .pg-prose a:hover { color: var(--ph-magenta) !important; }
.pg-prose img { max-width: 100%; height: auto; border-radius: 12px; }
.pg-prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 0 0 1.2em; }
.pg-prose :is(td, th) { padding: 8px 12px; border: 1px solid var(--ph-line); }
.pg-prose br + br { display: none; }
.pg-prose ::selection { background: var(--ph-amber); color: var(--ph-ink); }

.pl-empty { margin-top: 0; }
.ph .pl-empty b { color: var(--ph-on-dark) !important; font-size: 1.3rem; }
.pl-empty .ph-btn { margin-top: 12px; }

@media print {
    .ph-nav, .ph-foot, .ph-up, .pl-progress, .pl-docs, .pl-toc, .pl-print, .ph-close, .pb-rail, .sbx-tab, .sbx { display: none !important; }
    body.ps-home, .pg { background: #fff !important; padding: 0 !important; }
    .pl-title, .ph .pl-meta { color: #000 !important; }
    .pl-sheet { box-shadow: none; padding: 0; }
    .pl-body { display: block; }
}

/* ── Blog ──────────────────────────────────────────────────────────────── */

.pb-head { padding: clamp(28px, 5vw, 72px) 0 clamp(20px, 3vw, 36px); }
.ph .pb-meta { margin: 0 0 12px; color: var(--ph-on-dark-soft) !important; font-size: .82rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

.pb-lead {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(24px, 4vw, 56px);
    margin-bottom: clamp(48px, 6vw, 80px);
    animation: ph-deal .8s .15s var(--ph-ease) both;
}
.pb-lead__art, .pb-post__art {
    display: block;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(160deg, var(--ph-indigo-bright), var(--ph-indigo-deep));
    box-shadow: var(--ph-shadow);
}
.pb-lead__art { aspect-ratio: 16 / 10; }
.pb-post__art { aspect-ratio: 16 / 10; margin-bottom: 16px; border-radius: var(--ph-radius); }
.pb-lead__art img, .pb-post__art img { width: 100%; height: 100%; object-fit: contain; transition: scale .8s var(--ph-ease); }
/* Covers are admin uploads of any shape (often wide banners): shown whole on the indigo field, never cropped. */
.pb-lead:hover img, .pb-post:hover img { scale: 1.05; }
.ph .pb-lead__title { margin: 0 0 10px; font-size: clamp(1.7rem, 1.2rem + 1.4vw, 2.5rem); font-weight: 700; line-height: 1.05; letter-spacing: -.015em; text-wrap: balance; }
.ph .pb-post__title { margin: 0 0 6px; font-size: 1.3rem; font-weight: 700; line-height: 1.2; text-wrap: balance; }
.pb-lead__title a, .pb-post__title a { color: var(--ph-on-dark); font-size: inherit; line-height: inherit; text-decoration: none; }
/* The title link covers its whole story. */
.pb-lead__title a::after, .pb-post__title a::after { content: ""; position: absolute; inset: 0; border-radius: 20px; }
.pb-lead__title a:focus-visible, .pb-post__title a:focus-visible { outline: none; }
.pb-lead__title a:focus-visible::after, .pb-post__title a:focus-visible::after { outline: 3px solid var(--ph-amber); outline-offset: 6px; }
.pb-lead:hover .pb-lead__title a, .pb-post:hover .pb-post__title a { color: var(--ph-magenta-on-dark); }
.ph .pb-excerpt { margin: 0 0 18px; color: var(--ph-on-dark-soft) !important; font-size: 1.02rem; line-height: 1.6; }
.pb-more { display: inline-flex; align-items: center; gap: 8px; color: var(--ph-on-dark); font-weight: 700; }
.pb-more svg { transition: translate .3s var(--ph-ease); }
.pb-lead:hover .pb-more svg { translate: 5px 0; }

.pb-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 36px);
    margin: 0 0 clamp(24px, 4vw, 48px);
    padding: 0;
    list-style: none;
}
.pb-post { position: relative; transition: translate .4s var(--ph-ease); }
.pb-post:hover { translate: 0 -4px; }

.pb-story__head { padding: clamp(24px, 4vw, 56px) 0 0; }
.pb-story__wrap { max-width: 1000px; }
.pb-back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; color: var(--ph-on-dark-soft); font-weight: 600; text-decoration: none; }
.pb-back:hover { color: var(--ph-amber); }
.pb-back svg { transition: translate .3s var(--ph-ease); }
.pb-back:hover svg { translate: -4px 0; }
.pb-story__title { margin: 0 0 14px; color: var(--ph-on-dark); font-size: clamp(2.2rem, 1.2rem + 3.2vw, 4.2rem); font-weight: 700; line-height: 1.02; letter-spacing: -.02em; text-wrap: balance; animation: ph-rise .9s var(--ph-ease) both; }
.pb-story__art {
    max-width: 1240px;
    margin: clamp(20px, 3vw, 36px) auto 0;
    padding-inline: var(--ph-gutter);
}
.pb-story__art img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin-inline: auto;
    border-radius: 24px;
    box-shadow: var(--ph-shadow);
    animation: ph-fade 1s .15s ease both;
}
.pb-story__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: clamp(24px, 4vw, 56px);
    align-items: start;
    margin-top: clamp(24px, 3vw, 40px);
    position: relative;
}
.pb-rail { position: sticky; top: 96px; }
.pb-rail__card { display: grid; gap: 14px; justify-items: start; padding: 24px; border-radius: 20px; background: linear-gradient(160deg, var(--ph-indigo-bright), var(--ph-indigo-deep)); box-shadow: var(--ph-shadow); }
.pb-rail__title { margin: 0; color: var(--ph-on-dark); font-size: 1.4rem; font-weight: 700; }
.ph .pb-rail__card p { margin: 0; color: var(--ph-on-dark-soft) !important; font-size: .95rem; line-height: 1.5; }
.pb-next .ph-h2 { margin-bottom: 32px; }

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 1099px) {
    .pg-open__grid { grid-template-columns: minmax(0, 1fr); }
    .pg-open__copy { max-width: 720px; padding-top: 0; }
    .pg-open__grid { gap: 8px; }
    .ph .pg-proof { margin-top: 20px; }
    .pa-grid { grid-template-columns: minmax(0, 1fr); }
    .pa-side { position: static; }
    .pa-sheet { order: -1; max-width: 640px; width: 100%; justify-self: center; }
    .pa-side { max-width: 640px; width: 100%; justify-self: center; }
    .pc-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
    /* Phones: headline, then the form, then the ways to reach us. */
    .pc-side { display: contents; }
    .pc-sheet { order: 1; margin: 4px 0 32px; }
    .pc-lines { order: 2; }
    .pc-tips { order: 3; }
    .pc-floor { order: 4; margin-top: 24px; }
    .pl-body { grid-template-columns: minmax(0, 1fr); }
    .pl-toc { position: static; max-height: none; padding: 14px 18px; border: 1px solid var(--ph-on-dark-line); border-radius: var(--ph-radius); }
    .pl-toc h2.pl-toc__title { display: none; }
    button.pl-toc__title { display: flex; justify-content: space-between; align-items: center; width: 100%; margin: 0; padding: 4px 0; border: 0; background: none; cursor: pointer; }
    button.pl-toc__title::after { content: "+"; color: var(--ph-on-dark); font-size: 1.2rem; }
    button.pl-toc__title[aria-expanded="true"]::after { content: "–"; }
    .pl-toc__list { margin-top: 10px; }
    .pl-toc__list[hidden] { display: none; }
    .pb-story__body { grid-template-columns: minmax(0, 1fr); margin-top: 24px; }
    .pb-rail { position: static; padding-top: 0; }
}

@media (max-width: 767px) {
    .pg-house__list { grid-template-columns: minmax(0, 1fr); }
    .pg-who__grid { grid-template-columns: minmax(0, 1fr); }
    .pb-lead { grid-template-columns: minmax(0, 1fr); }
    .pa-field__row--2 { grid-template-columns: minmax(0, 1fr); }
    .pa-side__title { font-size: 2rem; }
    .pa-side .pa-perks, .pa-side .pa-quote { display: none; }
    .pf-panel { padding: 18px; }
    .pb-story__art { padding-inline: 0; }
    .pb-story__art img { border-radius: 0; }
}

@media (max-width: 575px) {
    .pa-sheet { padding: 22px 18px; border-radius: 18px; }
    .pa-steps li { font-size: .68rem; }
    .pc-lines li { grid-template-columns: 40px 1fr; }
    button.pc-copy { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .pf-room, .pf-you, .pf-tag, .pf-label { transition: none !important; }
}

/* Button pairs wrap rather than squeeze their labels. */
.pg .ph-actions > .ph-btn { flex: 1 1 auto; }
@media (max-width: 575px) {
    .pg .ph-actions { flex-wrap: wrap; }
    .pg .ph-actions > .ph-btn { flex: 1 1 100%; }
}


/* /rankings: players by XP (rankings.blade.php). */
.pr-list { display: grid; gap: 2px; margin: 0 0 clamp(24px, 4vw, 48px); padding: 0; list-style: none; }
.pr-row { display: grid; grid-template-columns: 3.5ch 40px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 16px; border-radius: var(--ph-radius); color: var(--ph-on-dark); text-decoration: none; }
.pr-row:hover { background: color-mix(in srgb, var(--ph-indigo-bright) 22%, transparent); color: var(--ph-on-dark); }
.pr-row:focus-visible { outline: 3px solid var(--ph-amber); outline-offset: 2px; }
.ph .pr-rank { color: var(--ph-on-dark-soft) !important; font-size: 1.2rem; font-weight: 700; text-align: right; }
.pr-name { font-weight: 700; overflow-wrap: anywhere; }
.pr-xp { color: var(--ph-on-dark-soft); font-weight: 600; white-space: nowrap; }