/* SPMA Hub Pages: The Shelf main portal */

.spma-shelf-page {
    --shelf-green: #006837;
    --shelf-green-dark: #004e2a;
    --shelf-gold: #d5be52;
    --shelf-gold-soft: #e9dda4;
    --shelf-ink: #0d1511;
    --shelf-muted: #5f6a64;
    --shelf-line: #e2e7e4;
    --shelf-soft: #f5f7f6;
    --shelf-white: #fff;
    --shelf-black: #07110c;
    --shelf-radius-sm: 14px;
    --shelf-radius-md: 22px;
    --shelf-radius-lg: 32px;
    --shelf-shadow-sm: 0 10px 30px rgba(0, 37, 20, .08);
    --shelf-shadow-md: 0 24px 68px rgba(0, 37, 20, .14);
    --shelf-container: 1240px;
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    overflow: hidden;
    background: var(--shelf-white);
    color: var(--shelf-ink);
    font-family: inherit;
}

.spma-shelf-page,
.spma-shelf-page * { box-sizing: border-box; }
.spma-shelf-page img { display: block; max-width: 100%; }
.spma-shelf-page a { text-decoration: none; }
.spma-shelf-page button,
.spma-shelf-page input,
.spma-shelf-page select { font: inherit; }
.spma-shelf-page a:focus-visible,
.spma-shelf-page button:focus-visible,
.spma-shelf-page input:focus-visible,
.spma-shelf-page select:focus-visible { outline: 3px solid var(--shelf-gold); outline-offset: 3px; }

.spma-shelf-container { width: min(calc(100% - 48px), var(--shelf-container)); margin: 0 auto; }

.spma-shelf-eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 12px;
    color: var(--shelf-green);
    font-size: 12px;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: .15em;
    text-transform: uppercase;
}
.spma-shelf-eyebrow--light { color: var(--shelf-gold-soft); }

/* Hero */
.spma-shelf-hero {
    position: relative;
    isolation: isolate;
    padding: clamp(72px, 8vw, 118px) 0 clamp(64px, 7vw, 100px);
    color: var(--shelf-white);
    background:
        radial-gradient(circle at 84% 16%, rgba(213,190,82,.19), transparent 24%),
        radial-gradient(circle at 10% 90%, rgba(233,221,164,.09), transparent 30%),
        linear-gradient(135deg, var(--shelf-green-dark) 0%, #003d21 48%, #002d18 100%);
}
.spma-shelf-hero__pattern {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .16;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.065) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.065) 1px, transparent 1px);
    background-size: 58px 58px;
    mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.7) 65%, transparent 100%);
}
.spma-shelf-hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(390px, .9fr); gap: clamp(42px, 6vw, 88px); align-items: center; }
.spma-shelf-hero h1 { max-width: 800px; margin: 0; color: #fff; font-size: clamp(48px, 6vw, 82px); line-height: .99; letter-spacing: -.052em; font-weight: 900; }
.spma-shelf-hero__lede { max-width: 720px; margin: 26px 0 0; color: rgba(255,255,255,.82); font-size: clamp(18px, 1.8vw, 22px); line-height: 1.58; }
.spma-shelf-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.spma-shelf-button { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; gap: 10px; padding: 0 23px; border: 1px solid transparent; border-radius: 999px; font-size: 14px; line-height: 1; font-weight: 900; transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease; }
.spma-shelf-button:hover { transform: translateY(-2px); }
.spma-shelf-button--gold { background: var(--shelf-gold); color: #172016; box-shadow: 0 12px 30px rgba(0,0,0,.16); }
.spma-shelf-button--gold:hover { background: var(--shelf-gold-soft); color: #10170f; }
.spma-shelf-button--ghost { border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.07); color: #fff; }
.spma-shelf-button--ghost:hover { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.12); color: #fff; }
.spma-shelf-button--green { background: var(--shelf-green); color: #fff; }
.spma-shelf-button--green:hover { background: var(--shelf-green-dark); color: #fff; }

.spma-shelf-hero__panel { overflow: hidden; border: 1px solid rgba(255,255,255,.16); border-radius: 26px; background: rgba(255,255,255,.08); box-shadow: 0 28px 80px rgba(0,0,0,.18); }
.spma-shelf-hero__panel-top { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 19px 22px; border-bottom: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.72); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }
.spma-shelf-hero__panel-top strong { color: var(--shelf-gold-soft); }
.spma-shelf-hero__formats { display: grid; }
.spma-shelf-hero__formats > a { display: grid; grid-template-columns: 46px minmax(0, 1fr) 18px; gap: 14px; align-items: center; min-height: 78px; padding: 13px 20px; border-bottom: 1px solid rgba(255,255,255,.1); color: #fff; transition: background .2s ease; }
.spma-shelf-hero__formats > a:last-child { border-bottom: 0; }
.spma-shelf-hero__formats > a:hover { background: rgba(255,255,255,.08); }
.spma-shelf-hero__format-icon { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 13px; background: rgba(213,190,82,.16); color: var(--shelf-gold); font-size: 18px; }
.spma-shelf-hero__formats strong { display: block; color: #fff; font-size: 16px; line-height: 1.2; }
.spma-shelf-hero__formats small { display: block; margin-top: 5px; color: rgba(255,255,255,.62); font-size: 12px; }
.spma-shelf-hero__formats > a > i { color: rgba(255,255,255,.45); font-size: 12px; }

/* Search */
.spma-shelf-search { position: relative; z-index: 2; margin-top: -28px; }
.spma-shelf-search__shell { display: grid; grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr); gap: 34px; align-items: center; padding: 28px; border: 1px solid var(--shelf-line); border-radius: 24px; background: #fff; box-shadow: var(--shelf-shadow-md); }
.spma-shelf-search__intro h2 { margin: 0; color: var(--shelf-ink); font-size: clamp(28px, 3vw, 38px); line-height: 1.08; letter-spacing: -.035em; font-weight: 900; }
.spma-shelf-search__intro > p:last-child { margin: 10px 0 0; color: var(--shelf-muted); line-height: 1.55; }
.spma-shelf-search__form { display: grid; grid-template-columns: minmax(0, 1fr) 170px auto; gap: 10px; align-items: center; }
.spma-shelf-search__input-wrap { position: relative; }
.spma-shelf-search__input-wrap > i { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: #7c8781; }
.spma-shelf-search input,
.spma-shelf-search select { width: 100%; height: 52px; border: 1px solid #cfd6d2; border-radius: 13px; background: #fff; color: var(--shelf-ink); }
.spma-shelf-search input { padding: 0 16px 0 46px; }
.spma-shelf-search select { padding: 0 35px 0 14px; }
.spma-shelf-search button { display: inline-flex; height: 52px; align-items: center; justify-content: center; gap: 10px; padding: 0 20px; border: 0; border-radius: 13px; background: var(--shelf-green); color: #fff; font-weight: 900; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.spma-shelf-search button:hover { background: var(--shelf-green-dark); transform: translateY(-1px); }
.spma-shelf-search__clear { grid-column: 1 / -1; justify-self: end; color: var(--shelf-green); font-size: 13px; font-weight: 800; }

/* Sections */
.spma-shelf-section { padding: clamp(68px, 7vw, 104px) 0; }
.spma-shelf-section--soft { background: var(--shelf-soft); }
.spma-shelf-section--dark { background: var(--shelf-black); color: #fff; }
.spma-shelf-section--dark .spma-shelf-section-head h2 { color: #fff; }
.spma-shelf-section--dark .spma-shelf-section-head > div > p:last-child { color: rgba(255,255,255,.65); }
.spma-shelf-section--dark .spma-shelf-eyebrow { color: var(--shelf-gold-soft); }

.spma-shelf-section-head { display: flex; justify-content: space-between; gap: 32px; align-items: end; margin-bottom: 34px; }
.spma-shelf-section-head > div { max-width: 790px; }
.spma-shelf-section-head h2 { margin: 0; color: var(--shelf-ink); font-size: clamp(34px, 4.5vw, 58px); line-height: 1.03; letter-spacing: -.045em; font-weight: 900; }
.spma-shelf-section-head > div > p:last-child { max-width: 760px; margin: 14px 0 0; color: var(--shelf-muted); font-size: 17px; line-height: 1.65; }
.spma-shelf-section-head__link { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 10px; padding-bottom: 5px; color: var(--shelf-green); font-size: 14px; font-weight: 900; border-bottom: 2px solid var(--shelf-gold); }
.spma-shelf-section-head__link:hover { color: var(--shelf-green-dark); }

/* Format portal */
.spma-shelf-format-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.spma-shelf-format-card { display: flex; min-height: 390px; flex-direction: column; padding: 24px; border: 1px solid var(--shelf-line); border-radius: var(--shelf-radius-md); background: #fff; box-shadow: var(--shelf-shadow-sm); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.spma-shelf-format-card:hover { transform: translateY(-5px); border-color: rgba(0,104,55,.25); box-shadow: var(--shelf-shadow-md); }
.spma-shelf-format-card__top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.spma-shelf-format-card__icon { display: inline-flex; width: 50px; height: 50px; align-items: center; justify-content: center; border-radius: 15px; background: var(--shelf-green-dark); color: var(--shelf-gold); font-size: 19px; }
.spma-shelf-format-card__count { color: #68746e; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.spma-shelf-format-card h3 { margin: 22px 0 0; font-size: 27px; line-height: 1.1; letter-spacing: -.03em; font-weight: 900; }
.spma-shelf-format-card h3 a { color: var(--shelf-ink); }
.spma-shelf-format-card > p { margin: 13px 0 0; color: var(--shelf-muted); font-size: 14px; line-height: 1.65; }
.spma-shelf-format-card__topics { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.spma-shelf-format-card__topics a { padding: 6px 9px; border-radius: 999px; background: #f0f4f2; color: #46524c; font-size: 11px; line-height: 1.2; font-weight: 800; }
.spma-shelf-format-card__topics a:hover { background: var(--shelf-gold-soft); color: #172016; }
.spma-shelf-format-card__cta { display: inline-flex; align-items: center; gap: 9px; margin-top: auto; padding-top: 22px; color: var(--shelf-green); font-size: 14px; font-weight: 900; }

/* Cards */
.spma-shelf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.spma-shelf-card { overflow: hidden; border: 1px solid var(--shelf-line); border-radius: var(--shelf-radius-md); background: #fff; box-shadow: 0 8px 28px rgba(0,37,20,.06); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.spma-shelf-card:hover { transform: translateY(-5px); border-color: rgba(0,104,55,.22); box-shadow: var(--shelf-shadow-md); }
.spma-shelf-card__media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #edf2ef; }
.spma-shelf-card__image { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.spma-shelf-card:hover .spma-shelf-card__image { transform: scale(1.025); }
.spma-shelf-card__fallback { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: var(--shelf-gold); font-size: 36px; background: linear-gradient(145deg, var(--shelf-green-dark), var(--shelf-green)); }
.spma-shelf-card__format { position: absolute; left: 14px; top: 14px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 999px; background: rgba(4,19,11,.84); color: #fff; font-size: 11px; line-height: 1; font-weight: 900; }
.spma-shelf-card__body { padding: 22px; }
.spma-shelf-card__terms { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.spma-shelf-card__terms a { color: var(--shelf-green); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .07em; }
.spma-shelf-card__title { margin: 0; font-size: 23px; line-height: 1.16; letter-spacing: -.025em; font-weight: 900; }
.spma-shelf-card__title a { color: var(--shelf-ink); }
.spma-shelf-card__title a:hover { color: var(--shelf-green); }
.spma-shelf-card__description { margin: 12px 0 0; color: var(--shelf-muted); font-size: 14px; line-height: 1.65; }
.spma-shelf-card__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; color: #758078; font-size: 12px; line-height: 1.4; }
.spma-shelf-card__meta-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--shelf-gold); }
.spma-shelf-card__link { display: inline-flex; align-items: center; gap: 9px; margin-top: 18px; color: var(--shelf-green); font-size: 13px; font-weight: 900; }

/* Topic discovery */
.spma-shelf-topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.spma-shelf-topic-card { padding: 25px; border: 1px solid rgba(255,255,255,.12); border-radius: var(--shelf-radius-md); background: rgba(255,255,255,.055); }
.spma-shelf-topic-card__icon { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 14px; background: rgba(213,190,82,.14); color: var(--shelf-gold); }
.spma-shelf-topic-card h3 { margin: 19px 0 0; color: #fff; font-size: 25px; font-weight: 900; letter-spacing: -.025em; }
.spma-shelf-topic-card > p { margin: 10px 0 0; color: rgba(255,255,255,.63); font-size: 14px; line-height: 1.6; }
.spma-shelf-topic-card__links { display: grid; gap: 3px; margin-top: 17px; }
.spma-shelf-topic-card__links a { display: flex; justify-content: space-between; gap: 15px; align-items: center; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.08); color: rgba(255,255,255,.88); font-size: 13px; font-weight: 700; }
.spma-shelf-topic-card__links a:hover { color: var(--shelf-gold-soft); }
.spma-shelf-topic-card__links i { color: var(--shelf-gold); font-size: 10px; }

/* Results */
.spma-shelf-results { padding-top: 72px; }
.spma-shelf-results + .spma-shelf-section--soft { padding-top: 72px; }
.spma-shelf-pagination { margin-top: 36px; }
.spma-shelf-pagination .page-numbers { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin: 0; padding: 0; list-style: none; }
.spma-shelf-pagination .page-numbers li { margin: 0; padding: 0; }
.spma-shelf-pagination a.page-numbers,
.spma-shelf-pagination span.page-numbers { display: inline-flex; min-width: 42px; height: 42px; align-items: center; justify-content: center; gap: 7px; padding: 0 13px; border: 1px solid var(--shelf-line); border-radius: 11px; background: #fff; color: var(--shelf-ink); font-size: 13px; font-weight: 800; }
.spma-shelf-pagination span.current { border-color: var(--shelf-green); background: var(--shelf-green); color: #fff; }
.spma-shelf-empty { padding: 50px 30px; border: 1px solid var(--shelf-line); border-radius: var(--shelf-radius-md); background: var(--shelf-soft); text-align: center; }
.spma-shelf-empty > i { color: var(--shelf-green); font-size: 28px; }
.spma-shelf-empty h3 { margin: 16px 0 0; font-size: 26px; font-weight: 900; }
.spma-shelf-empty p { margin: 9px auto 20px; max-width: 600px; color: var(--shelf-muted); }

/* About */
.spma-shelf-about { background: linear-gradient(180deg, #fff, #f8faf9); }
.spma-shelf-about__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr); gap: clamp(40px, 7vw, 90px); align-items: start; }
.spma-shelf-about__copy h2 { margin: 0; color: var(--shelf-ink); font-size: clamp(38px, 5vw, 64px); line-height: 1; letter-spacing: -.045em; font-weight: 900; }
.spma-shelf-about__copy > p:not(.spma-shelf-eyebrow) { max-width: 780px; margin: 20px 0 0; color: #4e5a53; font-size: 17px; line-height: 1.75; }
.spma-shelf-about__aside { padding: 30px; border-radius: var(--shelf-radius-lg); background: var(--shelf-green-dark); color: #fff; box-shadow: var(--shelf-shadow-md); }
.spma-shelf-about__icon { display: inline-flex; width: 52px; height: 52px; align-items: center; justify-content: center; border-radius: 15px; background: rgba(213,190,82,.15); color: var(--shelf-gold); font-size: 20px; }
.spma-shelf-about__aside h3 { margin: 20px 0 0; color: #fff; font-size: 27px; line-height: 1.18; font-weight: 900; }
.spma-shelf-about__aside > p { margin: 13px 0 0; color: rgba(255,255,255,.7); line-height: 1.65; }
.spma-shelf-about__actions { display: grid; gap: 3px; margin-top: 20px; }
.spma-shelf-about__actions a { display: flex; justify-content: space-between; gap: 15px; align-items: center; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.12); color: #fff; font-size: 14px; font-weight: 800; }
.spma-shelf-about__actions a:hover { color: var(--shelf-gold-soft); }

/* Jobs CTA */
.spma-shelf-jobs { padding: 56px 0; color: #fff; background: linear-gradient(110deg, #08130d 0%, var(--shelf-green-dark) 100%); }
.spma-shelf-jobs__inner { display: flex; justify-content: space-between; gap: 50px; align-items: center; }
.spma-shelf-jobs h2 { max-width: 760px; margin: 0; color: #fff; font-size: clamp(32px, 4vw, 48px); line-height: 1.05; letter-spacing: -.035em; font-weight: 900; }
.spma-shelf-jobs p:not(.spma-shelf-eyebrow) { max-width: 760px; margin: 14px 0 0; color: rgba(255,255,255,.7); line-height: 1.6; }

@media (max-width: 1100px) {
    .spma-shelf-hero__grid { grid-template-columns: 1fr; }
    .spma-shelf-hero__panel { max-width: 720px; }
    .spma-shelf-search__shell { grid-template-columns: 1fr; }
    .spma-shelf-format-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .spma-shelf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .spma-shelf-topic-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .spma-shelf-container { width: min(calc(100% - 30px), var(--shelf-container)); }
    .spma-shelf-hero { padding-top: 66px; }
    .spma-shelf-hero h1 { font-size: clamp(43px, 13vw, 62px); }
    .spma-shelf-hero__panel { border-radius: 20px; }
    .spma-shelf-search { margin-top: -20px; }
    .spma-shelf-search__shell { padding: 20px; border-radius: 19px; }
    .spma-shelf-search__form { grid-template-columns: 1fr; }
    .spma-shelf-search button,
    .spma-shelf-search input,
    .spma-shelf-search select { width: 100%; }
    .spma-shelf-search__clear { grid-column: auto; justify-self: start; }
    .spma-shelf-section-head { display: block; }
    .spma-shelf-section-head__link { margin-top: 18px; }
    .spma-shelf-format-grid,
    .spma-shelf-grid { grid-template-columns: 1fr; }
    .spma-shelf-format-card { min-height: 0; }
    .spma-shelf-latest__rail { grid-auto-columns: minmax(78vw, 300px); }
    .spma-shelf-about__grid { grid-template-columns: 1fr; }
    .spma-shelf-jobs__inner { display: block; }
    .spma-shelf-jobs .spma-shelf-button { margin-top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    .spma-shelf-page *,
    .spma-shelf-page *::before,
    .spma-shelf-page *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* v1.15.13: viewport-breakout guard. Prevent 100vw full-bleed sections from
 * creating a page-level horizontal scrollbar on desktop browsers where the
 * vertical scrollbar is included in viewport units. */
html,
body {
    overflow-x: clip !important;
}
