@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;600;700&display=swap');

:root {
    --paper: #f2ebdf;
    --paper-shadow: #e8dfd0;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-solid: #fcfbf7;
    --ink: #171717;
    --muted: #37342f;
    --line: #171717;
    --link: #093fd1;
    --accent-red: #c52c1d;
    --accent-blue: #4a6981;
    --accent-green: #556956;
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, 'Source Sans 3', sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.6), transparent 32%),
        linear-gradient(180deg, #f8f3eb 0%, var(--paper) 58%, var(--paper-shadow) 100%);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.22;
    background-image:
        radial-gradient(rgba(194, 120, 75, 0.35) 0.55px, transparent 0.8px),
        radial-gradient(rgba(68, 53, 39, 0.1) 0.45px, transparent 0.7px);
    background-position: 0 0, 1.5px 1.5px;
    background-size: 4px 4px, 5px 5px;
}

a {
    color: var(--link);
}

h1,
h2,
h3,
.home-headline,
.page-headline,
.journal-title,
.back-bar {
    font-family: Georgia, 'Times New Roman', serif;
}

.site-shell {
    min-height: 100vh;
    padding: 1.55rem 0 5rem;
    position: relative;
}

.wrap {
    width: min(1280px, calc(100vw - 3rem));
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.home-layout,
.split-layout {
    display: grid;
    grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
    gap: 1.15rem 1.35rem;
    align-items: start;
}

.home-layout {
    min-height: calc(100vh - 7rem);
}

.rail-stack,
.results-stack {
    display: grid;
    gap: 0.95rem;
    align-content: start;
}

.panel-card {
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: visible;
}

.hero-panel,
.title-panel,
.content-panel,
.nav-panel,
.back-bar,
.promise-card {
    background: var(--surface-solid);
}

.hero-panel,
.title-panel,
.content-panel {
    padding: 1.25rem 1.45rem;
}

.home-headline,
.page-headline {
    margin: 0;
    line-height: 0.96;
    color: #0d0d0d;
}

.home-headline {
    font-size: clamp(2.9rem, 5vw, 4.15rem);
    max-width: 7ch;
}

.page-headline {
    font-size: clamp(2.1rem, 3vw, 3rem);
}

.hero-copy,
.content,
.body,
.summary,
.meta,
.journal-meta,
.journal-excerpt,
.result-count,
.results-empty,
.empty,
.evidence-list li,
.related-list li,
.promise-card p {
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.5;
}

.cms-body,
.content {
    margin-top: 0.95rem;
}

.hero-copy {
    font-size: 1rem;
    max-width: 30ch;
}

.admin-link,
.home-link,
.blog-link,
.back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.35rem 1rem;
    border: 1px solid #6d6d6d;
    border-radius: 999px;
    text-decoration: none;
    background: #f6f2ea;
    color: var(--ink);
    font-size: 0.95rem;
}

.nav-panel {
    display: flex;
    gap: 0.15rem;
    padding: 0.2rem;
    align-items: stretch;
    min-height: 2.75rem;
    justify-content: space-between;
}

.subnav {
    margin: 0;
}

.subnav a {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.3rem;
    padding: 0.32rem 0.55rem;
    border-radius: 999px;
    color: var(--ink);
    text-decoration: none;
    font-size: 0.9rem;
}

.subnav a:hover {
    background: rgba(0, 0, 0, 0.05);
}

.subnav a.is-active,
.subnav a[aria-current='page'] {
    font-weight: 700;
}

.filter-panel {
    position: sticky;
    top: 1rem;
    z-index: 2;
}

.promise-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}

.promise-filter.is-pending {
    pointer-events: none;
    opacity: 0.76;
}

.promise-filter.is-pending::after {
    content: attr(data-pending-message);
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    padding: 0 0.95rem;
    border: 1px dashed #342f27;
    border-radius: 999px;
    background: rgba(255, 253, 250, 0.94);
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.geography-drilldown {
    display: flex;
    flex: 0 1 auto;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-width: 0;
}

.geography-select {
    flex: 1 1 150px;
}

.filter-control {
    min-height: 2.5rem;
    border: 1px solid #342f27;
    border-radius: 999px;
    background-color: #fffdfa;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0 0.95rem;
    min-width: 0;
    box-shadow:
        0 1px 0 rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.filter-select {
    flex: 1 1 150px;
}

.filter-dropdown {
    position: relative;
    flex: 1 1 150px;
    min-width: 0;
}

.filter-sort-select {
    flex: 0 1 190px;
}

.filter-dropdown.filter-sort-select {
    flex: 0 1 190px;
}

.promise-filter.is-select-enhanced .filter-select-native {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
    inset: auto;
}

.filter-dropdown-trigger {
    width: 100%;
    min-height: 2.5rem;
    border: 1px solid #342f27;
    border-radius: 999px;
    background: #fffdfa;
    color: var(--muted);
    padding: 0.1rem 2.2rem 0.1rem 0.95rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    box-shadow:
        0 1px 0 rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
    cursor: pointer;
    position: relative;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.filter-dropdown-trigger::after {
    content: '';
    position: absolute;
    right: 0.95rem;
    top: 50%;
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid #5b513f;
    border-bottom: 2px solid #5b513f;
    transform: translateY(-60%) rotate(45deg);
    transition: transform 140ms ease;
}

.filter-dropdown.is-open .filter-dropdown-trigger::after {
    transform: translateY(-28%) rotate(225deg);
}

.filter-dropdown.filter-sort-select .filter-dropdown-trigger {
    font-weight: 700;
    border-style: dashed;
}

.filter-dropdown-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.35rem);
    z-index: 15;
    max-height: 17rem;
    overflow-y: auto;
    padding: 0.3rem;
    border: 1px solid #2b2721;
    border-radius: 14px;
    background: #fffdf8;
    box-shadow:
        0 10px 26px rgba(26, 19, 13, 0.18),
        0 1px 0 rgba(255, 255, 255, 0.7) inset;
    display: none;
}

.filter-dropdown.is-open .filter-dropdown-menu {
    display: block;
}

.filter-dropdown-option {
    width: 100%;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font-size: 0.88rem;
    text-align: left;
    padding: 0.45rem 0.62rem;
    cursor: pointer;
}

.filter-dropdown-option:hover,
.filter-dropdown-option:focus {
    outline: none;
    background: #f5ecda;
    color: var(--ink);
}

.filter-dropdown-option.is-selected {
    background: #eee2c6;
    color: var(--ink);
    font-weight: 700;
}

.filter-search {
    flex: 1.35 1 220px;
}

.filter-control[type='search']::-webkit-search-cancel-button {
    appearance: none;
}

.filter-select {
    appearance: auto;
    text-align: left;
    text-align-last: left;
}

.filter-search {
    text-align: left;
}

.filter-control:hover {
    border-color: #18140f;
}

.filter-dropdown-trigger:hover {
    border-color: #18140f;
}

.filter-sort-select:hover {
    border-color: #18140f;
}

.filter-control:focus {
    outline: none;
    border-color: #18130f;
    box-shadow: 0 0 0 3px rgba(9, 63, 209, 0.14);
}

.filter-dropdown-trigger:focus {
    outline: none;
    border-color: #18130f;
    box-shadow: 0 0 0 3px rgba(9, 63, 209, 0.14);
}

.filter-sort-select:focus {
    box-shadow: 0 0 0 3px rgba(9, 63, 209, 0.14);
}

.filter-dropdown.filter-sort-select .filter-dropdown-trigger:focus {
    box-shadow: 0 0 0 3px rgba(9, 63, 209, 0.14);
}

.filter-control:disabled {
    border-color: #4a4439;
    color: var(--muted);
    opacity: 1;
    cursor: not-allowed;
    -webkit-text-fill-color: var(--muted);
}

.filter-dropdown-trigger:disabled {
    border-color: #4a4439;
    color: var(--muted);
    cursor: not-allowed;
}

.filter-control:disabled:hover {
    border-color: #4a4439;
}

.filter-dropdown-trigger:disabled:hover {
    border-color: #4a4439;
}

@media (forced-colors: active) {
    .filter-select {
        appearance: auto;
        -webkit-appearance: menulist;
        -moz-appearance: menulist;
        background-image: none;
        padding-right: 0.8rem;
    }

    .filter-control:disabled {
        -webkit-text-fill-color: currentColor;
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.filter-meta {
    margin-top: 0.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.active-filter-chips {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.active-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    min-height: 1.7rem;
    padding: 0.1rem 0.62rem;
    border: 1px solid #6c6c6c;
    border-radius: 999px;
    background: #f8f3e6;
    color: var(--muted);
    font-size: 0.81rem;
}

.active-filter-chip-label {
    color: var(--ink);
    font-weight: 700;
}

.filter-note {
    margin: 0;
    font-size: 0.88rem;
}

.filter-clear-link {
    color: var(--muted);
    font-size: 0.88rem;
    text-decoration: none;
    white-space: nowrap;
}

.filter-clear-link:hover {
    text-decoration: underline;
}

.results-empty,
.empty {
    text-align: center;
    padding: 0.75rem 0;
}

.list,
.promise-list,
.journal-list {
    margin: 0;
}

.promise-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.promise-card,
.content-panel {
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.results-stack {
    min-height: calc(100vh - 9rem);
}

.filter-panel {
    display: grid;
    gap: 0.35rem;
}

.promise-card {
    padding: 0.95rem 1rem;
    border-radius: var(--radius-lg);
}

.promise-card h2,
.promise-card h3 {
    margin: 0;
    font-size: 1.18rem;
    line-height: 1.15;
}

.promise-card h2 a,
.promise-card h3 a {
    color: var(--ink);
    text-decoration: none;
}

.promise-sentiment {
    margin: 0.2rem 0 0;
    color: var(--muted);
    font-size: 0.83rem;
}

.badge,
.status,
.related-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.9rem;
    margin-top: 0.55rem;
    padding: 0.18rem 0.7rem;
    border: 1px solid #6c6c6c;
    border-radius: 999px;
    background: #f7f0d9;
    color: #5b4516;
    font-size: 0.82rem;
    text-decoration: none;
}

.thumb,
.hero-media,
.gallery-thumb {
    border: 2px solid var(--line);
    border-radius: var(--radius-md);
    background: #f2eee6;
}

.thumb {
    margin-top: 0.8rem;
    width: 100%;
    max-height: 245px;
    object-fit: cover;
}

.content-panel {
    min-height: 13rem;
}

.rich-copy {
    font-size: 1.08rem;
    line-height: 1.6;
}

.rich-copy p:first-child {
    margin-top: 0;
}

.journal-panel {
    padding: 1.2rem 1.45rem;
}

.journal-list {
    display: grid;
    gap: 1rem;
}

.journal-item + .journal-item {
    padding-top: 0.35rem;
    border-top: 1px solid rgba(23, 23, 23, 0.18);
}

.journal-title {
    display: inline-block;
    font-size: 1.02rem;
    font-weight: 700;
}

.journal-meta,
.detail-meta {
    margin: 0 0 0.35rem;
}

.journal-excerpt {
    margin: 0.2rem 0 0;
}

.promise-index-panel,
.promise-content-panel,
.prose-panel {
    padding: 1.2rem 1.35rem;
}

.prose-panel,
.journal-panel {
    max-width: 660px;
    justify-self: start;
}

.promise-index-panel {
    width: 100%;
}

.title-panel {
    min-height: 5.4rem;
    display: flex;
    align-items: center;
}

.content-panel {
    border-radius: 24px;
}

.hero-media {
    margin-top: 1rem;
    overflow: hidden;
    cursor: zoom-in;
}

.hero-media img {
    display: block;
    width: 100%;
    max-height: 560px;
    object-fit: contain;
    background: #f2eee6;
}

.gallery {
    margin-top: 0.8rem;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.55rem;
}

.gallery-thumb {
    padding: 0;
    overflow: hidden;
    cursor: pointer;
}

.gallery-thumb img {
    width: 100%;
    height: 96px;
    object-fit: cover;
    display: block;
}

.section-title {
    margin: 1.35rem 0 0.55rem;
    font-size: 1.45rem;
}

.public-sentiment-panel {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(23, 23, 23, 0.2);
    border-radius: var(--radius-md);
    background: #fcf7ec;
}

.sentiment-title {
    margin-top: 0;
}

.public-sentiment-summary {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.public-reaction-actions {
    margin-top: 0.65rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.public-reaction-actions.is-pending {
    pointer-events: none;
}

.reaction-button {
    min-height: 2rem;
    padding: 0.15rem 0.75rem;
    border: 1px solid #5f5a52;
    border-radius: 999px;
    background: #fffdfa;
    color: var(--ink);
    font-size: 0.86rem;
    cursor: pointer;
}

.reaction-button:hover {
    background: #f9f2e5;
}

.reaction-button.is-active {
    border-color: #171717;
    background: #f4ead3;
    font-weight: 700;
}

.reaction-button.is-pending {
    border-color: #171717;
    background: #f4ead3;
    cursor: progress;
}

.evidence-list,
.related-list {
    margin: 0.2rem 0 0;
    padding-left: 1.2rem;
}

.evidence-list a,
.related-list a {
    color: var(--link);
}

.timeline-panel {
    padding: 1.2rem 1.35rem;
}

.timeline-list {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.timeline-item {
    display: grid;
    grid-template-columns: 1.1rem minmax(0, 1fr);
    gap: 0.85rem;
    align-items: start;
}

.timeline-marker {
    width: 0.85rem;
    height: 0.85rem;
    margin-top: 0.5rem;
    border: 2px solid var(--line);
    border-radius: 999px;
    background: #f7f0d9;
}

.timeline-content {
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(23, 23, 23, 0.14);
}

.timeline-item:last-child .timeline-content {
    padding-bottom: 0;
    border-bottom: 0;
}

.timeline-meta,
.timeline-body {
    margin: 0;
}

.timeline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    color: var(--muted);
    font-size: 0.85rem;
}

.timeline-eyebrow {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.timeline-title {
    margin: 0.18rem 0 0.28rem;
    font-size: 1.08rem;
    line-height: 1.2;
}

.timeline-link {
    display: inline-block;
    margin-top: 0.45rem;
    color: var(--link);
}

.backbar-wrap {
    margin-top: 1.1rem;
}

.back-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3.2rem;
    padding: 0.55rem 1rem;
    font-size: 0.98rem;
    color: var(--ink);
    text-decoration: none;
}

.pager {
    margin-top: 1rem;
}

.pager nav {
    display: flex;
    justify-content: center;
}

.site-mascot {
    position: fixed;
    right: 1.65rem;
    bottom: 1.2rem;
    width: min(180px, 16vw);
    min-width: 108px;
    z-index: 1;
}

.site-mascot img {
    display: block;
    width: 100%;
    height: auto;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(12, 12, 12, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 99;
}

.lightbox img {
    max-width: min(1200px, 96vw);
    max-height: 88vh;
    border-radius: var(--radius-sm);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    background: #fff;
}

.lightbox.open {
    display: flex;
}

@media (max-width: 1040px) {
    .wrap {
        width: calc(100vw - 2rem);
    }

    .home-layout,
    .split-layout {
        grid-template-columns: 1fr;
    }

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

    .site-mascot {
        width: 120px;
        right: 1rem;
    }

    .prose-panel,
    .journal-panel {
        max-width: none;
    }
}

@media (max-width: 820px) {
    .promise-filter {
        gap: 0.35rem;
    }

    .filter-select,
    .filter-search {
        flex-basis: 100%;
    }

    .filter-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.2rem;
    }

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

@media (max-width: 640px) {
    .site-shell {
        padding-top: 1rem;
        padding-bottom: 7rem;
    }

    .wrap {
        width: calc(100vw - 1rem);
    }

    .hero-panel,
    .title-panel,
    .content-panel {
        padding: 1rem 1.1rem;
    }

    .home-headline {
        font-size: 2.6rem;
    }

    .page-headline {
        font-size: 2rem;
    }

    .nav-panel {
        flex-wrap: wrap;
    }

    .subnav a {
        flex-basis: calc(50% - 0.2rem);
    }

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

    .site-mascot {
        width: 96px;
    }
}
