/* Shared page templates: content, message, people and documents (page-templates/).
   Loaded after interior.css, which supplies the page hero. Not part of the approved
   static design; built from its tokens (navy, gold, stone) and type. */

/* ── SHARED PIECES ──────────────────────────────── */
.pg-body {
    font-size: 15.5px;
    line-height: 1.9;
    color: var(--muted);
    margin-bottom: 18px;
}

.pg-body strong {
    color: var(--navy);
    font-weight: 600;
}

.pg-body a {
    color: var(--navy);
    border-bottom: 1px solid var(--gold);
}

.section-h2 em {
    color: var(--gold);
    font-style: italic;
}

/* A picture on a tilted colour panel, with a ring and a patch of dots peeking out behind it.
   --fx and --fx-2 colour the panel, --fx-pop the ring and dots; pg-frame--2 to --4 change them,
   so the pictures down a page take the colours in turn. */
.pg-frame {
    --fx: #2580E0;
    --fx-2: #3CC9B8;
    --fx-pop: #F7B733;
    position: relative;
    isolation: isolate;
    display: inline-block;
    max-width: 100%;
    margin: 18px;
}

.pg-frame--2 { --fx: #E5533D; --fx-2: #F7B733; --fx-pop: #3CC9B8; }
.pg-frame--3 { --fx: #7352E0; --fx-2: #FF86B4; --fx-pop: #F7B733; }
.pg-frame--4 { --fx: #2E9E55; --fx-2: #3CC9B8; --fx-pop: #FF8A65; }

.pg-frame::before {
    content: '';
    position: absolute;
    inset: -16px;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--fx), var(--fx-2));
    box-shadow: 0 34px 60px -34px var(--fx);
    transform: rotate(-3.5deg);
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: -2;
}

.pg-frame::after {
    content: '';
    position: absolute;
    right: -46px;
    bottom: -46px;
    width: 132px;
    height: 132px;
    background: radial-gradient(circle, var(--fx-pop) 3px, transparent 3.6px) 0 0 / 18px 18px;
    z-index: -3;
}

.pg-frame-ring {
    position: absolute;
    top: -40px;
    left: -40px;
    width: 104px;
    height: 104px;
    border: 13px solid var(--fx-pop);
    border-radius: 50%;
    z-index: -1;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.pg-frame:hover::before {
    transform: rotate(2.5deg);
}

.pg-frame:hover .pg-frame-ring {
    transform: translate(-6px, -6px) scale(1.06);
}

/* Pictures keep their own shape: a small or upright one is shown at its natural size, not stretched */
.pg-frame img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 560px;
    border: 6px solid var(--white);
    border-radius: 18px;
    box-shadow: 0 24px 50px -18px rgba(10, 22, 40, 0.35);
}

/* Until the picture arrives (or if it never does) the frame holds a tinted 4:3 panel, so the
   decorations don't collapse around the alt text. The templates add is-loaded on load. */
.pg-frame img:not(.is-loaded) {
    width: 440px;
    min-height: 240px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: var(--stone);
    color: transparent;
}

.pg-ticks {
    list-style: none;
    display: grid;
    gap: 12px;
    margin: 6px 0 18px;
}

.pg-ticks li {
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 12px;
    align-items: start;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
}

.pg-ticks svg {
    width: 26px;
    height: 26px;
    padding: 6px;
    border-radius: 50%;
    background: var(--gold-pale);
    color: var(--gold);
}

/* ── INTRODUCTION ───────────────────────────────── */
.pg-intro {
    background: var(--white);
    position: relative;
}

.pg-intro-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 88px;
    align-items: center;
}

.pg-intro-copy .pg-body:first-of-type {
    font-size: 17.5px;
    line-height: 1.85;
    color: var(--text);
}

.pg-intro-media {
    position: relative;
    display: flex;
    justify-content: center;
}

.pg-badge {
    position: absolute;
    left: -28px;
    bottom: 34px;
    background: var(--navy);
    color: var(--gold-light);
    font-family: 'Montserrat', sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    padding: 16px 22px;
    border-radius: 8px;
    border-left: 3px solid var(--gold);
    box-shadow: 0 18px 40px rgba(10, 22, 40, 0.28);
    max-width: 240px;
    line-height: 1.6;
}

.pg-intro--centered .pg-intro-grid {
    grid-template-columns: 1fr;
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
}

.pg-intro--centered .pg-intro-copy::before {
    content: '';
    display: block;
    width: 1px;
    height: 56px;
    margin: -40px auto 28px;
    background: linear-gradient(180deg, transparent, var(--gold));
}

/* ── SECTIONS ───────────────────────────────────── */
.pg-block--text + .pg-block--text,
.pg-intro + .pg-block--text {
    padding-top: 0;
}

.pg-block--text + .pg-block--text .pg-rail {
    border-top: 1px solid var(--border);
    padding-top: 72px;
}

/* Text: a numbered heading rail beside the body */
.pg-rail {
    display: grid;
    grid-template-columns: minmax(240px, 0.8fr) 1.6fr;
    gap: 72px;
    align-items: start;
}

.pg-rail-head {
    position: sticky;
    top: 120px;
}

.pg-rail-num {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 64px;
    font-weight: 700;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--gold);
    margin-bottom: 14px;
}

.pg-rail-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(24px, 2.4vw, 32px);
    font-weight: 700;
    line-height: 1.22;
    color: var(--navy);
}

.pg-rail-title::after {
    content: '';
    display: block;
    width: 44px;
    height: 2px;
    background: var(--gold);
    margin-top: 18px;
}

.pg-rail-body > :last-child {
    margin-bottom: 0;
}

/* Text with a picture */
.pg-block--split {
    background: var(--offwhite);
}

.pg-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 88px;
    align-items: center;
}

.pg-split-media {
    display: flex;
    justify-content: center;
}

.pg-block--split.is-flipped .pg-split-copy {
    order: 2;
}

/* Mirrored when the picture is on the left */
.pg-block--split.is-flipped .pg-frame::before {
    transform: rotate(3.5deg);
}

.pg-block--split.is-flipped .pg-frame:hover::before {
    transform: rotate(-2.5deg);
}

.pg-block--split.is-flipped .pg-frame::after {
    right: auto;
    left: -46px;
}

.pg-block--split.is-flipped .pg-frame-ring {
    left: auto;
    right: -40px;
}

/* Cards with an icon */
.pg-block--cards {
    background: var(--stone);
}

.pg-icon-cards {
    display: grid;
    gap: 28px;
    grid-template-columns: repeat(3, 1fr);
}

.pg-icon-cards--1 {
    grid-template-columns: minmax(0, 720px);
    justify-content: center;
}

.pg-icon-cards--2 {
    grid-template-columns: repeat(2, 1fr);
}

.pg-icon-card {
    position: relative;
    background: var(--white);
    border: 1px solid var(--stone-border);
    border-radius: 14px;
    padding: 44px 38px 40px;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, opacity 0.7s ease;
}

.pg-icon-card::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.pg-icon-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 60px rgba(10, 22, 40, 0.12);
}

.pg-icon-card:hover::before {
    transform: scaleX(1);
}

.pg-icon {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    background: var(--navy);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 26px;
}

.pg-icon svg {
    width: 26px;
    height: 26px;
}

.pg-icon-title {
    font-family: 'Playfair Display', serif;
    font-size: 23px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--navy);
    margin-bottom: 14px;
}

.pg-icon-text {
    font-size: 15px;
    line-height: 1.85;
    color: var(--muted);
    margin-bottom: 14px;
}

.pg-icon-card > :last-child {
    margin-bottom: 0;
}

/* Notice: one large picture */
.pg-block--notice {
    background:
        radial-gradient(circle at 12% 0%, rgba(201, 168, 76, 0.14), transparent 46%),
        var(--offwhite);
}

.pg-notice {
    max-width: 880px;
    margin: 0 auto;
    text-align: center;
}

.pg-notice .pg-body {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.pg-notice-image {
    display: block;
    margin: 28px 0 32px;
    padding: 14px;
    background: var(--white);
    border: 1px solid var(--stone-border);
    border-radius: 16px;
    box-shadow: 0 34px 80px rgba(10, 22, 40, 0.14);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.pg-notice-image:hover {
    transform: translateY(-4px);
    box-shadow: 0 44px 90px rgba(10, 22, 40, 0.2);
}

.pg-notice-image img {
    width: 100%;
    border-radius: 8px;
}

.pg-notice .pg-ticks {
    text-align: left;
    max-width: 560px;
    margin: 0 auto 28px;
}

/* Table */
.pg-table-block > .section-h2 {
    margin-bottom: 24px;
}

.pg-table-wrap {
    margin: 8px 0 22px;
}

.pg-table-filter {
    display: block;
    width: 100%;
    max-width: 360px;
    margin-bottom: 16px;
    padding: 13px 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    color: var(--text);
    background: var(--offwhite);
}

.pg-table-filter:focus {
    outline: 2px solid var(--gold);
    outline-offset: 1px;
    background: var(--white);
}

.pg-table-scroll {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(10, 22, 40, 0.06);
}

.pg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14.5px;
}

.pg-table th {
    background: var(--navy);
    color: var(--gold-light);
    font-family: 'Montserrat', sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    text-align: left;
    padding: 18px 22px;
    white-space: nowrap;
}

.pg-table td {
    padding: 15px 22px;
    line-height: 1.6;
    color: var(--text);
    border-top: 1px solid var(--border);
}

.pg-table tbody tr:nth-child(even) {
    background: var(--offwhite);
}

.pg-table tbody tr:hover {
    background: var(--gold-pale);
}

.pg-table tr[hidden] {
    display: none;
}

.pg-table-none {
    padding: 22px;
    font-size: 14.5px;
    color: var(--muted);
}

/* Highlight band */
.pg-block--band {
    background:
        radial-gradient(circle at 88% 12%, rgba(201, 168, 76, 0.18), transparent 42%),
        var(--navy);
}

.pg-band {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.pg-band-copy:only-child {
    grid-column: 1 / -1;
    max-width: 820px;
}

.pg-band .pg-body {
    color: rgba(255, 255, 255, 0.68);
}

.pg-band .pg-ticks li {
    color: rgba(255, 255, 255, 0.86);
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pg-band .pg-ticks svg {
    background: rgba(201, 168, 76, 0.16);
    color: var(--gold-light);
}

/* ── PICTURE CARDS ──────────────────────────────── */
.pg-cards-section {
    background: var(--white);
}

.pg-cards-head {
    margin-bottom: 44px;
}

.pg-cards {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(4, 1fr);
}

.pg-cards--three {
    grid-template-columns: repeat(3, 1fr);
}

.pg-card {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    border-radius: 14px;
    overflow: hidden;
    background: var(--navy-mid);
    color: var(--white);
}

.pg-cards--three .pg-card {
    aspect-ratio: 4 / 3.4;
}

.pg-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.pg-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(6, 14, 28, 0) 38%, rgba(6, 14, 28, 0.88) 100%);
    transition: opacity 0.4s;
}

.pg-card--plain::after {
    opacity: 0;
}

.pg-card:hover img {
    transform: scale(1.07);
}

.pg-card-body {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 22px;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.pg-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 21px;
    font-weight: 600;
    line-height: 1.25;
}

.pg-card-title::before {
    content: '';
    display: block;
    width: 28px;
    height: 2px;
    background: var(--gold);
    margin-bottom: 12px;
    transition: width 0.35s ease;
}

.pg-card:hover .pg-card-title::before {
    width: 56px;
}

.pg-card-go {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.pg-card-go svg {
    width: 16px;
    height: 16px;
}

a.pg-card:hover .pg-card-go {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--navy-deep);
}

/* ── QUOTE ──────────────────────────────────────── */
.pg-quote {
    background: var(--stone);
    padding: 96px 48px;
    border-top: 1px solid var(--stone-border);
    border-bottom: 1px solid var(--stone-border);
}

.pg-quote-inner {
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
}

.pg-quote-portrait {
    width: 104px;
    height: 104px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 28px;
    border: 3px solid var(--gold);
    padding: 4px;
    background: var(--white);
}

.pg-quote-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: clamp(22px, 2.6vw, 32px);
    line-height: 1.5;
    color: var(--navy);
    margin-bottom: 24px;
}

.pg-quote-attr {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--navy);
}

.pg-quote-attr span {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: none;
    color: var(--muted);
}

/* ── MESSAGE ────────────────────────────────────── */
.msg-section {
    background:
        linear-gradient(90deg, var(--stone) 0, var(--stone) 28%, var(--white) 28%);
}

.msg-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.72fr) 1.28fr;
    gap: 88px;
    align-items: start;
}

.msg-grid--no-photo {
    grid-template-columns: minmax(0, 820px);
    justify-content: center;
}

.msg-aside {
    position: sticky;
    top: 120px;
}

/* The portrait gets the same colour panel, ring and dots as .pg-frame */
.msg-photo-wrap {
    --fx: #7352E0;
    --fx-2: #2580E0;
    --fx-pop: #F7B733;
    position: relative;
    isolation: isolate;
    margin: 18px;
}

.msg-photo-wrap::before {
    content: '';
    position: absolute;
    top: -40px;
    left: -40px;
    width: 104px;
    height: 104px;
    border: 13px solid var(--fx-pop);
    border-radius: 50%;
    z-index: 0;
}

.msg-photo-wrap::after {
    content: '';
    position: absolute;
    right: -46px;
    bottom: -46px;
    width: 132px;
    height: 132px;
    background: radial-gradient(circle, var(--fx-pop) 3px, transparent 3.6px) 0 0 / 18px 18px;
    z-index: -2;
}

.msg-photo {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: top center;
    display: block;
    border: 6px solid var(--white);
    border-radius: 18px;
    box-shadow: 0 24px 50px -18px rgba(10, 22, 40, 0.35);
    background: var(--stone);
    color: transparent;
}

.msg-photo-frame {
    position: absolute;
    inset: -16px;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--fx), var(--fx-2));
    box-shadow: 0 34px 60px -34px var(--fx);
    transform: rotate(-3.5deg);
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: -1;
}

.msg-photo-wrap:hover .msg-photo-frame {
    transform: rotate(2.5deg);
}

.msg-tag {
    position: absolute;
    z-index: 2;
    left: -14px;
    bottom: 36px;
    background: var(--navy);
    color: var(--gold-light);
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 11px 18px;
    border-radius: 6px;
}

.msg-letter {
    position: relative;
}

.msg-body {
    position: relative;
    padding-top: 20px;
}

.msg-body::before {
    content: '\201C';
    position: absolute;
    top: -34px;
    left: -12px;
    font-family: 'Playfair Display', serif;
    font-size: 150px;
    line-height: 1;
    color: var(--gold);
    opacity: 0.22;
    pointer-events: none;
}

.msg-body p {
    font-size: 16px;
    line-height: 1.95;
    color: var(--muted);
    margin-bottom: 20px;
}

.msg-body p:first-child {
    font-family: 'Playfair Display', serif;
    font-size: 21px;
    line-height: 1.65;
    color: var(--navy);
}

.msg-body strong {
    color: var(--navy);
}

.msg-sign {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.msg-signoff {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 17px;
    color: var(--muted);
    margin-bottom: 8px;
}

.msg-name {
    font-family: 'Playfair Display', serif;
    font-size: 25px;
    font-weight: 700;
    color: var(--navy);
}

.msg-role {
    margin-top: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.6px;
    line-height: 1.8;
    text-transform: uppercase;
    color: var(--gold);
}

/* ── PEOPLE ─────────────────────────────────────── */
.ppl-section {
    background: var(--offwhite);
}

.ppl-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 56px;
}

.ppl-head .section-lead {
    margin: 0 auto;
}

.ppl-lead,
.ppl-grid {
    display: grid;
    gap: 28px;
}

.ppl-lead {
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 28px;
}

.ppl-grid {
    grid-template-columns: repeat(4, 1fr);
}

.ppl-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, opacity 0.7s ease;
}

.ppl-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 60px rgba(10, 22, 40, 0.14);
}

.ppl-photo {
    aspect-ratio: 4 / 4.6;
    background: var(--stone);
    overflow: hidden;
}

.ppl-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.ppl-card:hover .ppl-photo img {
    transform: scale(1.05);
}

.ppl-info {
    position: relative;
    padding: 24px 24px 26px;
}

.ppl-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    width: 36px;
    height: 2px;
    background: var(--gold);
}

.ppl-name {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--navy);
}

.ppl-role {
    margin-top: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 1.4px;
    line-height: 1.7;
    text-transform: uppercase;
    color: var(--gold);
}

/* The one or two people who lead the group: a wide card, portrait beside the name */
.ppl-lead .ppl-card {
    display: grid;
    grid-template-columns: 0.85fr 1fr;
    background: var(--navy);
    border-color: var(--navy);
}

.ppl-lead .ppl-photo {
    aspect-ratio: auto;
    min-height: 320px;
}

.ppl-lead .ppl-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40px 36px;
}

.ppl-lead .ppl-info::before {
    top: 40px;
    left: 36px;
    width: 48px;
}

.ppl-lead .ppl-name {
    font-size: 26px;
    color: var(--white);
}

.ppl-lead .ppl-role {
    color: var(--gold-light);
    font-size: 11px;
}

/* ── DOCUMENTS ──────────────────────────────────── */
.doc-section {
    background: var(--offwhite);
}

.doc-head {
    max-width: 760px;
    margin-bottom: 40px;
}

.doc-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.doc-jump a {
    font-family: 'Montserrat', sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--navy);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 11px 20px;
    transition: background 0.25s, border-color 0.25s, color 0.25s;
}

.doc-jump a:hover {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--gold-light);
}

.doc-group {
    padding-top: 56px;
    scroll-margin-top: 80px;
}

.doc-group-title {
    display: flex;
    align-items: center;
    gap: 18px;
    font-family: 'Playfair Display', serif;
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 28px;
}

.doc-group-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--gold), transparent);
}

.doc-list {
    list-style: none;
    counter-reset: doc;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(10, 22, 40, 0.05);
    overflow: hidden;
}

.doc-row {
    counter-increment: doc;
    display: grid;
    grid-template-columns: 54px 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 20px 28px;
    border-top: 1px solid var(--border);
    transition: background 0.25s;
}

.doc-row:first-child {
    border-top: 0;
}

.doc-row:hover {
    background: var(--gold-pale);
}

.doc-row::before {
    content: counter(doc, decimal-leading-zero);
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--gold);
}

.doc-row-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.6px;
    line-height: 1.6;
    text-transform: uppercase;
    color: var(--navy);
}

.doc-row-detail {
    margin-top: 5px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--muted);
}

.doc-row-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-family: 'Montserrat', sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--navy);
    border: 1px solid rgba(10, 22, 40, 0.2);
    border-radius: 100px;
    padding: 10px 18px;
    transition: background 0.25s, border-color 0.25s, color 0.25s;
}

.doc-row-link svg {
    width: 13px;
    height: 13px;
}

.doc-row-link:hover {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--gold-light);
}

/* A shelf of covers (publications) */
.doc-shelf {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 36px 28px;
    padding: 36px 32px 30px;
    background: var(--stone);
    border: 1px solid var(--stone-border);
    border-radius: 16px;
}

.doc-cover {
    display: block;
    text-align: center;
}

.doc-cover-art {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4.1;
    border-radius: 4px 10px 10px 4px;
    overflow: hidden;
    background: var(--navy-mid);
    box-shadow: -6px 0 0 -3px rgba(10, 22, 40, 0.18), 0 22px 44px rgba(10, 22, 40, 0.24);
    transform-origin: left center;
    transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.45s;
}

.doc-cover-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.doc-cover-open {
    position: absolute;
    inset: auto 0 0 0;
    padding: 34px 12px 16px;
    background: linear-gradient(180deg, transparent, rgba(6, 14, 28, 0.9));
    color: var(--gold-light);
    font-family: 'Montserrat', sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.3s;
}

a.doc-cover:hover .doc-cover-art {
    transform: perspective(900px) rotateY(-9deg) translateY(-6px);
    box-shadow: -6px 0 0 -3px rgba(10, 22, 40, 0.18), 18px 30px 54px rgba(10, 22, 40, 0.3);
}

a.doc-cover:hover .doc-cover-open,
a.doc-cover:focus-visible .doc-cover-open {
    opacity: 1;
}

.doc-cover-title {
    display: block;
    margin-top: 18px;
    font-family: 'Playfair Display', serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--navy);
}

.doc-cover-detail {
    display: block;
    margin-top: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--gold);
}

.doc-empty {
    max-width: 560px;
    margin: 24px auto 0;
    padding: 56px 40px;
    text-align: center;
    background: var(--white);
    border: 1px dashed var(--stone-border);
    border-radius: 16px;
}

.doc-empty svg {
    width: 44px;
    height: 44px;
    color: var(--gold);
    margin: 0 auto 18px;
}

.doc-empty p {
    font-size: 15.5px;
    line-height: 1.8;
    color: var(--muted);
}

/* ── APPLICATION FORM (the form card is the Contact page's) ── */
.app-section {
    background:
        radial-gradient(circle at 0% 100%, rgba(201, 168, 76, 0.14), transparent 42%),
        var(--offwhite);
}

.app-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 80px;
    align-items: start;
}

.app-copy {
    position: sticky;
    top: 120px;
}

.app-form-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 44px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(10, 22, 40, 0.07);
}

.app-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

.form-title {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 6px;
}

.form-note {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.field {
    margin-bottom: 20px;
}

.field label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 8px;
}

.field input,
.field select {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 14.5px;
    color: var(--text);
    background: var(--offwhite);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 13px 16px;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.field input:focus,
.field select:focus {
    outline: none;
    border-color: var(--gold);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.14);
}

.field select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.field input[type="file"] {
    padding: 10px 12px;
    border-style: dashed;
    cursor: pointer;
}

.field input[type="file"]::file-selector-button {
    font-family: 'Montserrat', sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--gold-light);
    background: var(--navy);
    border: 0;
    border-radius: 6px;
    padding: 10px 16px;
    margin-right: 14px;
    cursor: pointer;
}

.field-hint {
    margin-top: 8px;
    font-size: 12.5px;
    color: var(--muted);
}

.form-submit {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.form-success {
    font-size: 14px;
    color: #1f7a4d;
    font-weight: 500;
    display: none;
    align-items: center;
    gap: 8px;
}

.form-success.show {
    display: flex;
}

.form-success svg {
    width: 18px;
    height: 18px;
}

.form-error {
    font-size: 14px;
    color: #b42318;
    font-weight: 500;
    margin-bottom: 18px;
}

/* ── CTA BAND (as on the About page) ────────────── */
.cta-band {
    background: linear-gradient(120deg, var(--stone), var(--gold-pale));
    border-top: 1px solid var(--stone-border);
    position: relative;
    overflow: hidden;
    padding: 84px 48px;
}

.cta-band::before {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -6%;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.16) 0%, transparent 70%);
}

.cta-inner {
    position: relative;
    z-index: 2;
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.cta-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(26px, 3.4vw, 40px);
    font-weight: 700;
    color: var(--navy);
    line-height: 1.2;
}

.cta-title em {
    color: var(--gold);
    font-style: italic;
}

.cta-sub {
    font-size: 15px;
    color: var(--muted);
    margin-top: 12px;
    max-width: 460px;
    line-height: 1.7;
}

.cta-btns {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* ── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 1100px) {
    .cta-band {
        padding: 64px 40px;
    }
    .pg-intro-grid,
    .pg-split,
    .pg-band {
        gap: 56px;
    }

    .pg-rail {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .pg-rail-head {
        position: static;
    }

    .pg-icon-cards,
    .pg-icon-cards--2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .pg-cards,
    .pg-cards--three {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .msg-grid {
        gap: 56px;
    }

    .pg-quote {
        padding: 80px 40px;
    }
}

@media (max-width: 860px) {
    .app-grid {
        grid-template-columns: 1fr;
        gap: 44px;
    }

    .app-copy {
        position: static;
    }

    .pg-intro-grid,
    .pg-split,
    .pg-band,
    .msg-grid {
        grid-template-columns: 1fr;
    }

    .pg-block--split.is-flipped .pg-split-copy {
        order: 0;
    }

    .pg-badge {
        left: 16px;
    }

    .msg-section {
        background: var(--white);
    }

    .msg-aside {
        position: static;
        max-width: 380px;
    }

    .ppl-lead {
        grid-template-columns: 1fr;
    }

    .ppl-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .pg-frame,
    .msg-photo-wrap {
        margin: 14px;
    }

    .pg-frame::before,
    .msg-photo-frame {
        inset: -11px;
        border-radius: 22px;
    }

    .pg-frame::after,
    .msg-photo-wrap::after {
        right: -24px;
        bottom: -30px;
        width: 96px;
        height: 96px;
    }

    .pg-block--split.is-flipped .pg-frame::after {
        left: -24px;
    }

    .pg-frame-ring,
    .msg-photo-wrap::before {
        top: -26px;
        left: -22px;
        width: 72px;
        height: 72px;
        border-width: 9px;
    }

    .pg-block--split.is-flipped .pg-frame-ring {
        right: -22px;
    }

    .app-form-card {
        padding: 30px 22px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .cta-band {
        padding: 52px 24px;
    }

    .cta-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .cta-btns {
        width: 100%;
        flex-direction: column;
    }

    .cta-btns a {
        text-align: center;
    }

    .pg-icon-cards,
    .pg-icon-cards--2 {
        grid-template-columns: 1fr;
    }

    .pg-icon-card {
        padding: 34px 26px 30px;
    }

    .pg-rail-num {
        font-size: 48px;
    }

    .pg-block--text + .pg-block--text .pg-rail {
        padding-top: 48px;
    }

    .pg-cards,
    .pg-cards--three {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .pg-card-body {
        left: 14px;
        right: 14px;
        bottom: 14px;
    }

    .pg-card-title {
        font-size: 15.5px;
    }

    .pg-card-go {
        display: none;
    }

    .pg-quote {
        padding: 56px 24px;
    }

    .ppl-lead .ppl-card {
        grid-template-columns: 1fr;
    }

    .ppl-lead .ppl-photo {
        aspect-ratio: 4 / 4.2;
        min-height: 0;
    }

    .ppl-lead .ppl-info {
        padding: 30px 24px;
    }

    .ppl-lead .ppl-info::before {
        top: 0;
        left: 24px;
    }

    .ppl-grid {
        gap: 14px;
    }

    .ppl-info {
        padding: 18px 16px 20px;
    }

    .ppl-info::before {
        left: 16px;
    }

    .ppl-name {
        font-size: 15px;
    }

    .doc-row {
        grid-template-columns: 34px 1fr;
        gap: 12px 14px;
        padding: 18px;
    }

    .doc-row-link {
        grid-column: 2;
        justify-self: start;
    }

    .doc-shelf {
        grid-template-columns: 1fr 1fr;
        gap: 26px 16px;
        padding: 24px 18px;
    }

    /* Tables turn into one card per row, each cell labelled with its heading */
    .pg-table thead {
        display: none;
    }

    .pg-table,
    .pg-table tbody,
    .pg-table tr,
    .pg-table td {
        display: block;
    }

    .pg-table tr {
        padding: 14px 18px;
        border-top: 1px solid var(--border);
    }

    .pg-table tbody tr:first-child {
        border-top: 0;
    }

    .pg-table td {
        display: grid;
        grid-template-columns: 42% 1fr;
        gap: 12px;
        padding: 5px 0;
        border: 0;
    }

    .pg-table td::before {
        content: attr(data-label);
        font-family: 'Montserrat', sans-serif;
        font-size: 9.5px;
        font-weight: 700;
        letter-spacing: 1.2px;
        text-transform: uppercase;
        color: var(--gold);
        padding-top: 3px;
    }
}

/* A long page title can take the breadcrumb onto a second line */
.breadcrumb {
    flex-wrap: wrap;
}

@media (prefers-reduced-motion: reduce) {
    .pg-frame::before,
    .pg-frame-ring,
    .msg-photo-frame {
        transition: none;
    }
}

/* A transparent picture (a logo) sits on white, not on the frame's colours */
.pg-frame img {
    background: var(--white);
}

/* ── PLAIN LOOK (theme 1.18.1) ──────────────────── */
/* A Content Page whose "Page look" field is Plain (body class rcjps-plain, inc/setup.php):
   pictures without the colour panel, ring and dots (the white border, rounded corners and
   shadow stay, as does the quote portrait's ring), and no scroll-in or hover motion. */
.rcjps-plain .pg-frame {
    margin: 0;
}

.rcjps-plain .pg-frame::before,
.rcjps-plain .pg-frame::after,
.rcjps-plain .pg-frame-ring {
    display: none;
}

.rcjps-plain .reveal,
.rcjps-plain .reveal-left,
.rcjps-plain .reveal-right {
    opacity: 1;
    transform: none;
    transition: none;
}
