*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: Georgia, 'Times New Roman', serif;
    background: #f5f0e8;
    color: #2c1810;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    background: #2c1810;
    color: #f5f0e8;
    padding: 1.5rem 2rem;
    border-bottom: 4px solid #8b6914;
}
.header-inner { max-width: 960px; margin: 0 auto; }
.header-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
header h1 { font-size: 1.8rem; font-weight: normal; letter-spacing: 0.02em; }
header .subtitle { font-size: 0.9rem; color: #c4a882; margin-top: 0.25rem; }

/* Site nav */
.site-nav { display: flex; gap: 0.25rem; align-items: center; flex-wrap: wrap; }
.nav-link {
    font-family: Arial, sans-serif;
    font-size: 0.8rem;
    color: #c4a882;
    text-decoration: none;
    padding: 0.3rem 0.75rem;
    border-radius: 3px;
    transition: background 0.15s, color 0.15s;
    letter-spacing: 0.04em;
}
.nav-link:hover { background: rgba(255,255,255,0.1); color: #f5f0e8; }
.nav-active { color: #f5f0e8; background: rgba(255,255,255,0.12); }
.nav-search {
    background: #4a6741;
    color: #f5f0e8 !important;
    font-weight: bold;
    margin-left: 0.5rem;
}
.nav-search:hover { background: #5a7a50; }
.nav-search.nav-active { background: #5a7a50; }

/* Landing hero */
.landing-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
}
.landing-hero-inner { max-width: 640px; padding: 2rem 1rem; }
.landing-title {
    font-size: 2.4rem;
    font-weight: normal;
    color: #2c1810;
    letter-spacing: 0.02em;
    margin-bottom: 1rem;
}
.landing-lead {
    font-size: 1.05rem;
    color: #5a3820;
    line-height: 1.7;
    margin-bottom: 2rem;
    font-family: Arial, sans-serif;
}
.landing-cta {
    display: inline-block;
    background: #4a6741;
    color: #f5f0e8;
    text-decoration: none;
    padding: 0.75rem 2.2rem;
    border-radius: 4px;
    font-family: Arial, sans-serif;
    font-size: 1rem;
    font-weight: bold;
    letter-spacing: 0.03em;
    transition: background 0.15s;
    margin-bottom: 1.25rem;
}
.landing-cta:hover { background: #5a7a50; }
.landing-sub {
    font-family: Arial, sans-serif;
    font-size: 0.78rem;
    color: #8b6914;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* Landing dedication */
.landing-dedication {
    text-align: center;
    padding: 1.5rem 1rem 2.5rem;
}
.dedication-line {
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 0.85rem;
    color: #a08060;
}

/* Content pages (About / Platform / Scholars) */
.content-page { max-width: 720px; margin: 0 auto; padding: 2rem 1rem 3rem; }
.content-page-title {
    font-size: 1.8rem;
    font-weight: normal;
    color: #2c1810;
    border-bottom: 2px solid #8b6914;
    padding-bottom: 0.6rem;
    margin-bottom: 1.5rem;
}
.content-page-body { font-size: 1rem; line-height: 1.75; color: #3a2010; }
.content-page-body p { margin-bottom: 1.2rem; font-family: Arial, sans-serif; font-size: 0.95rem; }
.content-page-body h3 {
    font-size: 1.1rem;
    color: #2c1810;
    margin: 2rem 0 0.75rem;
    font-weight: normal;
    border-left: 3px solid #8b6914;
    padding-left: 0.75rem;
}

/* Archive cards on About page */
.archive-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 1rem 0 1.5rem; }
.archive-card { background: #fff; border: 1px solid #d4c4a0; border-radius: 8px; padding: 1rem 1.2rem; }
.archive-card-label { font-size: 0.85rem; font-weight: bold; color: #2c1810; margin-bottom: 0.2rem; font-family: Arial, sans-serif; }
.archive-card-years { font-size: 0.78rem; color: #8b6914; font-family: Arial, sans-serif; margin-bottom: 0.2rem; }
.archive-card-count { font-size: 1.1rem; font-weight: bold; color: #8b6914; margin-bottom: 0.6rem; font-family: Arial, sans-serif; }
.archive-card p { font-size: 0.82rem; color: #5a3820; line-height: 1.5; margin: 0; font-family: Arial, sans-serif; }

/* Scholar blocks */
.scholar-block { background: #fff; border: 1px solid #d4c4a0; border-radius: 8px; padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; }
.scholar-name { font-size: 1rem; font-weight: bold; color: #2c1810; margin-bottom: 0.5rem; }
.dedication-block { background: #2c1810; border-color: #8b6914; }
.dedication-block .scholar-name { color: #fde68a; }
.dedication-block p { color: #c4a882 !important; }
.dedication-quote { font-style: italic; color: #fde68a !important; font-size: 1rem !important; margin-top: 0.75rem !important; }

/* Main */
main {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    flex: 1;
    width: 100%;
}

/* Stats bar */
.stats-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.stat {
    background: #fff;
    border: 1px solid #d4c4a0;
    border-radius: 6px;
    padding: 10px 16px;
    flex: 1;
    min-width: 90px;
    text-align: center;
}
.stat-label {
    display: block;
    font-size: 11px;
    color: #7a6040;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
    font-family: Arial, sans-serif;
}
.stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: bold;
    color: #2c1810;
    font-family: Arial, sans-serif;
}

/* Toolbar */
.toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.toolbar input[type=text] {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #d4c4a0;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #fff;
    font-family: Arial, sans-serif;
}
.toolbar input[type=text]:focus {
    outline: none;
    border-color: #8b6914;
    box-shadow: 0 0 0 2px rgba(139,105,20,0.15);
}
.toolbar select {
    padding: 8px 12px;
    border: 1px solid #d4c4a0;
    border-radius: 6px;
    background: #fff;
    font-size: 0.9rem;
    font-family: Arial, sans-serif;
    cursor: pointer;
}

/* Results info */
#results-info {
    font-size: 0.85rem;
    color: #7a6040;
    margin-bottom: 0.75rem;
    font-family: Arial, sans-serif;
}

/* Record cards */
#records-list { display: flex; flex-direction: column; gap: 8px; }

.record-card {
    background: #fff;
    border: 1px solid #d4c4a0;
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.record-card:hover {
    border-color: #8b6914;
    box-shadow: 0 2px 8px rgba(44,24,16,0.08);
}
.record-card.expanded { border-color: #8b6914; }

.record-header { display: flex; align-items: flex-start; gap: 10px; }
.record-id {
    font-size: 11px;
    color: #a08050;
    min-width: 36px;
    padding-top: 3px;
    font-family: Arial, sans-serif;
}
.record-name { font-size: 1rem; color: #2c1810; flex: 1; line-height: 1.4; }
.record-surname { font-weight: bold; }
.record-given { font-weight: normal; color: #5a3820; }

.record-badges { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; }
.badge {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 20px;
    font-family: Arial, sans-serif;
    font-weight: 500;
}
.badge-bt   { background: #e8f0fb; color: #1a4a8a; border: 1px solid #b8d0f0; }
.badge-m    { background: #e8f5e8; color: #1a6a1a; border: 1px solid #b0d8b0; }
.badge-bur  { background: #fbe8e8; color: #8a1a1a; border: 1px solid #f0b8b8; }
.badge-succ { background: #fdf3e0; color: #7a4f00; border: 1px solid #f0d898; }
.badge-year { background: #f0ece4; color: #5a4030; border: 1px solid #d4c4a0; }
.badge-src  { background: #f5f0e8; color: #7a6040; border: 1px solid #d4c4a0; font-size: 9px; }

/* Ethnicity badges */
.badge-eth-white     { background: #f0ece4; color: #4a3820; border: 1px solid #d4c4a0; }
.badge-eth-creole    { background: #fdf3e0; color: #7a4f00; border: 1px solid #f0d898; }
.badge-eth-foc       { background: #e8f0fb; color: #1a4a8a; border: 1px solid #b8d0f0; }
.badge-eth-enslaved  { background: #2c1810; color: #f5f0e8; border: 1px solid #2c1810; }
.badge-eth-black     { background: #3a2410; color: #f5f0e8; border: 1px solid #3a2410; }
.badge-eth-griffe    { background: #e8dfc8; color: #4a3010; border: 1px solid #c8b890; }
.badge-eth-mulatto   { background: #f5ead0; color: #5a3820; border: 1px solid #d4b880; }
.badge-eth-quadroon  { background: #faf0d8; color: #6a4820; border: 1px solid #e0c890; }
.badge-eth-indigenous{ background: #e8f5e8; color: #1a5a1a; border: 1px solid #b0d8b0; }
.badge-eth-metis     { background: #f0e8f5; color: #4a1a6a; border: 1px solid #d0b0e8; }
.badge-eth-other     { background: #f0ece4; color: #5a4030; border: 1px solid #d4c4a0; }

/* Expanded detail */
.record-detail {
    display: none;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e8dfc8;
}
.record-card.expanded .record-detail { display: block; }

.full-text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #3a2410;
    background: #faf7f0;
    border: 1px solid #e8dfc8;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
}

.highlight { background: #fde68a; border-radius: 2px; padding: 0 1px; }

.names-section { margin-top: 8px; }
.names-label {
    font-size: 11px;
    color: #7a6040;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: Arial, sans-serif;
    margin-bottom: 6px;
}
.name-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.name-pill {
    font-size: 11px;
    padding: 3px 9px;
    background: #f0ece4;
    border: 1px solid #d4c4a0;
    border-radius: 20px;
    color: #5a3820;
    cursor: pointer;
    font-family: Arial, sans-serif;
    transition: background 0.1s;
}
.name-pill:hover { background: #e8dfc8; color: #2c1810; }

/* Pagination */
#pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.25rem;
    flex-wrap: wrap;
    gap: 8px;
    font-family: Arial, sans-serif;
}
.page-info { font-size: 0.85rem; color: #7a6040; }
.page-btns { display: flex; gap: 4px; }
.page-btns button {
    padding: 6px 14px;
    border: 1px solid #d4c4a0;
    border-radius: 6px;
    background: #fff;
    color: #2c1810;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.1s;
}
.page-btns button:hover:not(:disabled) { background: #f0ece4; }
.page-btns button:disabled { opacity: 0.4; cursor: not-allowed; }

/* No results / Loading */
.no-results, .loading {
    text-align: center;
    padding: 3rem 1rem;
    color: #7a6040;
    font-family: Arial, sans-serif;
}

/* Footer */
footer {
    background: #2c1810;
    color: #a08050;
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
    font-family: Arial, sans-serif;
    margin-top: auto;
}
.footer-copyright {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #7a6040;
}

@media (max-width: 600px) {
    header h1 { font-size: 1.3rem; }
    .toolbar { flex-direction: column; }
    .toolbar input, .toolbar select { width: 100%; }
}

/* Search section */
.search-section {
    margin-bottom: 1rem;
}
.search-row {
    display: flex;
    gap: 12px;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}
.search-field {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.search-label {
    font-size: 11px;
    color: #7a6040;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: Arial, sans-serif;
}
.search-field input[type=text] {
    padding: 8px 12px;
    border: 1px solid #d4c4a0;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #fff;
    font-family: Arial, sans-serif;
}
.search-field input[type=text]:focus {
    outline: none;
    border-color: #8b6914;
    box-shadow: 0 0 0 2px rgba(139,105,20,0.15);
}
.search-hint {
    font-size: 11px;
    color: #a08050;
    font-family: Arial, sans-serif;
    font-style: italic;
}

/* Variants bar */
.variants-info {
    background: #fdf3e0;
    border: 1px solid #f0d898;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.variants-label {
    font-size: 12px;
    color: #7a4f00;
    font-family: Arial, sans-serif;
    white-space: nowrap;
}
.variant-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.variant-pill {
    font-size: 11px;
    padding: 3px 9px;
    background: #fff;
    border: 1px solid #f0d898;
    border-radius: 20px;
    color: #7a4f00;
    cursor: pointer;
    font-family: Arial, sans-serif;
    transition: background 0.1s;
}
.variant-pill:hover {
    background: #faeeda;
    color: #5a3800;
}

/* Profile link and badge */
.profile-badge {
    font-family: Arial, sans-serif;
    font-size: 10px;
    padding: 3px 8px;
    background: #fdf3e0;
    border: 1px solid #f0d898;
    border-radius: 20px;
    color: #7a4f00;
    white-space: nowrap;
    align-self: flex-start;
}
.profile-link {
    display: inline-block;
    font-family: Arial, sans-serif;
    font-size: 13px;
    color: #8b6914;
    text-decoration: none;
    margin-bottom: 10px;
    font-weight: 500;
}
.profile-link:hover { text-decoration: underline; }

/* Enhanced pagination */
.pagination-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}
.page-jump {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: Arial, sans-serif;
    font-size: 13px;
}
.page-jump-label {
    color: #7a6040;
    font-size: 12px;
}
.page-jump input {
    padding: 4px 8px;
    border: 1px solid #d4c4a0;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
}
.page-pill {
    padding: 4px 10px;
    border: 1px solid #d4c4a0;
    border-radius: 4px;
    background: #fff;
    color: #2c1810;
    cursor: pointer;
    font-size: 13px;
    font-family: Arial, sans-serif;
    min-width: 32px;
    transition: background 0.1s;
}
.page-pill:hover { background: #f0ece4; }
.page-pill.active {
    background: #2c1810;
    color: #f5f0e8;
    border-color: #2c1810;
}
.page-ellipsis {
    padding: 4px 4px;
    color: #7a6040;
    font-family: Arial, sans-serif;
    font-size: 13px;
}

/* ── Database Toggle ──────────────────────────────────────────────────────── */
.db-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 1.25rem;
}
.db-btn {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid #d4c4a0;
    border-radius: 8px;
    background: #fff;
    color: #7a6040;
    cursor: pointer;
    text-align: left;
    font-family: Arial, sans-serif;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.db-btn:hover { border-color: #8b6914; background: #fdf9f2; }
.db-btn.active {
    border-color: #2c1810;
    background: #2c1810;
    color: #f5f0e8;
}
.db-btn-title {
    font-size: 0.95rem;
    font-weight: bold;
    display: block;
}
.db-btn-sub {
    font-size: 11px;
    opacity: 0.75;
    display: block;
}

/* ── Hall notice banner ───────────────────────────────────────────────────── */
.hall-notice {
    background: #edf2fb;
    border: 1px solid #b8d0f0;
    border-left: 4px solid #1a4a8a;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: #1a3a6a;
    margin-bottom: 1rem;
    font-family: Arial, sans-serif;
    line-height: 1.5;
}
.hall-notice a { color: #1a4a8a; font-weight: 500; }

/* ── Hall stats bar ───────────────────────────────────────────────────────── */
.hall-stat {
    border-color: #b8d0f0;
}
.hall-stat .stat-value { color: #1a3a6a; }

/* ── Hall record card ─────────────────────────────────────────────────────── */
.hall-card {
    border-left: 4px solid #1a4a8a;
}
.hall-card:hover { border-color: #1a4a8a; box-shadow: 0 2px 8px rgba(26,74,138,0.12); }
.hall-card.expanded { border-color: #1a4a8a; }

.hall-id { color: #4a6a9a; }

.hall-owner {
    font-size: 0.85rem;
    color: #4a5a7a;
    font-family: Arial, sans-serif;
    margin-top: 2px;
}

.hall-source-badge {
    font-family: Arial, sans-serif;
    font-size: 10px;
    padding: 3px 8px;
    background: #edf2fb;
    border: 1px solid #b8d0f0;
    border-radius: 20px;
    color: #1a4a8a;
    white-space: nowrap;
    align-self: flex-start;
    font-weight: 600;
}

/* ── Hall badges ──────────────────────────────────────────────────────────── */
.badge-hall-male    { background: #e8f0fb; color: #1a4a8a; border: 1px solid #b8d0f0; }
.badge-hall-female  { background: #f5e8fb; color: #6a1a8a; border: 1px solid #d8b0f0; }
.badge-hall-other   { background: #f0ece4; color: #5a4030; border: 1px solid #d4c4a0; }
.badge-hall-emn     { background: #1a4a8a; color: #f5f9ff; border: 1px solid #1a4a8a; }
.badge-hall-fpc     { background: #e8f5e8; color: #1a6a1a; border: 1px solid #b0d8b0; }
.badge-hall-afeth   { background: #fdf3e0; color: #7a4f00; border: 1px solid #f0d898; }
.badge-hall-parish  { background: #f0ece4; color: #5a4030; border: 1px solid #d4c4a0; font-size: 9px; }

/* ── Hall comments ────────────────────────────────────────────────────────── */
.hall-comments {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #dce8f8;
}
.hall-comment-text {
    font-size: 0.88rem;
    line-height: 1.7;
    color: #2a3a5a;
    background: #f4f7fd;
    border: 1px solid #dce8f8;
    border-radius: 6px;
    padding: 10px 12px;
}

/* ── Decode tabs ──────────────────────────────────────────────────────────── */
/* Decode tabs */
.decode-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}
.decode-tab {
    padding: 4px 14px;
    border: 1px solid #d4c4a0;
    border-radius: 4px;
    background: #f5f0e8;
    color: #7a6040;
    font-family: Arial, sans-serif;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.1s;
}
.decode-tab:hover { background: #e8dfc8; }
.decode-tab.active {
    background: #2c1810;
    color: #f5f0e8;
    border-color: #2c1810;
}

/* Decoded fields */
.decode-fields {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #faf7f0;
    border: 1px solid #e8dfc8;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
}
.decode-field {
    display: flex;
    gap: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
}
.decode-label {
    font-family: Arial, sans-serif;
    font-size: 11px;
    color: #7a6040;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    min-width: 130px;
    padding-top: 2px;
    flex-shrink: 0;
}
.decode-value {
    color: #2c1810;
    font-family: Georgia, serif;
}
.decode-empty {
    font-family: Arial, sans-serif;
    font-size: 13px;
    color: #7a6040;
    font-style: italic;
}

/* Census Fields — distinct layout */
.census-fields-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}
.census-fields-section {
    background: #f9f6f1;
    border: 1px solid #e0d5c7;
    border-radius: 5px;
    padding: 12px;
}
.census-section-title {
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: bold;
    color: #4a3c28;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #d0c0a0;
}
.census-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 8px;
}
.census-field:last-child {
    margin-bottom: 0;
}
.census-field-label {
    font-family: Arial, sans-serif;
    font-size: 10px;
    color: #6b5a47;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 500;
}
.census-field-value {
    color: #2c1810;
    font-family: Georgia, serif;
    padding-left: 6px;
    border-left: 2px solid #c4a882;
}

/* ── Cross-archive links (Hall ↔ Hebert) ─────────────────────────────────── */
.cross-links-section {
    margin-top: 14px;
    border-top: 1px solid #d4c4a0;
    padding-top: 12px;
}
.hall-back-section {
    border-top-color: #1a4a8a22;
}
.cross-links-label {
    font-family: Arial, sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7a6040;
    margin-bottom: 8px;
    font-weight: bold;
}
.hall-back-section .cross-links-label {
    color: #1a4a8a;
}
.cross-link-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 5px;
    background: #fdf9f2;
    border: 1px solid #e8dfc8;
    margin-bottom: 5px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-family: Arial, sans-serif;
    font-size: 13px;
}
.cross-link-item:hover {
    background: #f5edd8;
    border-color: #c4a870;
}
.hall-back-link {
    background: #f0f4fb;
    border-color: #c4d0e8;
}
.hall-back-link:hover {
    background: #dce8f8;
    border-color: #1a4a8a66;
}
.cross-link-name {
    font-weight: bold;
    color: #2c1810;
    flex: 0 0 auto;
}
.cross-link-year {
    color: #7a6040;
    font-size: 12px;
    flex: 0 0 auto;
}
.cross-link-parish {
    color: #1a4a8a;
    font-size: 11px;
    background: #e8eef8;
    border-radius: 3px;
    padding: 1px 5px;
    flex: 0 0 auto;
}
.cross-link-arrow {
    margin-left: auto;
    color: #8b6914;
    font-size: 12px;
    font-style: italic;
    white-space: nowrap;
}
.hall-back-link .cross-link-arrow {
    color: #1a4a8a;
}
.cross-link-more {
    font-family: Arial, sans-serif;
    font-size: 11px;
    color: #7a6040;
    font-style: italic;
    padding: 4px 10px;
}

/* Info tooltip (used on cross-link section labels) */
.info-tip {
    display: inline-block;
    position: relative;
    cursor: help;
    color: #8b6914;
    font-size: 12px;
    font-weight: normal;
    font-style: normal;
    letter-spacing: 0;
    text-transform: none;
    margin-left: 4px;
    vertical-align: middle;
}
.hall-back-section .info-tip { color: #1a4a8a; }
.info-tip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background: #2c1810;
    color: #f5f0e8;
    font-size: 11px;
    line-height: 1.5;
    padding: 8px 11px;
    border-radius: 6px;
    width: 250px;
    pointer-events: none;
    z-index: 100;
    transition: opacity 0.2s;
    font-family: Arial, sans-serif;
    font-weight: normal;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}
.info-tip:hover .info-tip-text {
    visibility: visible;
    opacity: 1;
}

/* Confidence badges for cross-links */
.badge-link-high {
    background: #1a6e2e;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 10px;
    border-radius: 3px;
    padding: 1px 5px;
}
.badge-link-med {
    background: #5a7a1a;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 10px;
    border-radius: 3px;
    padding: 1px 5px;
}
.badge-link-low {
    background: #9a7a1a;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 10px;
    border-radius: 3px;
    padding: 1px 5px;
}

/* Flash highlight when jumping to a linked record */
@keyframes cross-highlight-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(26, 74, 138, 0.5); }
    50%  { box-shadow: 0 0 0 8px rgba(26, 74, 138, 0.25); }
    100% { box-shadow: 0 0 0 0 rgba(26, 74, 138, 0); }
}
.cross-highlight {
    animation: cross-highlight-pulse 1.2s ease 2;
    border-left-color: #1a4a8a !important;
}

/* ── Hall links block on person.html profile pages ─────────────────────── */
.hall-links-person {
    margin-top: 14px;
    border-top: 1px solid #e8dfc8;
    padding-top: 12px;
}
.hall-links-person-label {
    font-family: Arial, sans-serif;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #1a4a8a;
    margin-bottom: 8px;
}
.hall-link-person-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 5px;
    background: #f0f4fb;
    border: 1px solid #c4d0e8;
    margin-bottom: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
    font-family: Arial, sans-serif;
    font-size: 13px;
}
.hall-link-person-item:hover {
    background: #dce8f8;
    border-color: #1a4a8a66;
}
.hall-link-person-name {
    font-weight: bold;
    color: #2c1810;
    flex: 0 0 auto;
}
.hall-link-person-year {
    color: #7a6040;
    font-size: 12px;
    flex: 0 0 auto;
}
.hall-link-person-parish {
    color: #1a4a8a;
    font-size: 11px;
    background: #e8eef8;
    border-radius: 3px;
    padding: 1px 5px;
    flex: 0 0 auto;
}
.hall-link-person-conf {
    font-size: 10px;
    border-radius: 3px;
    padding: 1px 5px;
    color: #fff;
}
.hall-link-person-conf.conf-high { background: #1a6e2e; }
.hall-link-person-conf.conf-med  { background: #5a7a1a; }
.hall-link-person-conf.conf-low  { background: #9a7a1a; }
.hall-link-person-arrow {
    margin-left: auto;
    color: #1a4a8a;
    font-size: 12px;
    font-style: italic;
    white-space: nowrap;
}
.hall-link-person-more {
    font-family: Arial, sans-serif;
    font-size: 11px;
    color: #7a6040;
    font-style: italic;
    padding: 4px 10px;
}

/* ── Census view toggle ── */
.census-view-toggle {
    display: flex;
    gap: 0;
    margin: 8px 0 4px 0;
}
.view-btn {
    padding: 5px 18px;
    border: 1px solid #b0a090;
    background: #f5f0eb;
    color: #5a4030;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.view-btn:first-child { border-radius: 4px 0 0 4px; }
.view-btn:last-child  { border-radius: 0 4px 4px 0; }
.view-btn.active {
    background: #7a5c3a;
    color: #fff;
    border-color: #5a3e20;
}

/* ── Household cards ── */
.household-card {
    background: #fff;
    border: 1px solid #d8cfc4;
    border-radius: 6px;
    margin-bottom: 12px;
    overflow: hidden;
}
.hh-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f5ede2;
    border-bottom: 1px solid #d8cfc4;
    flex-wrap: wrap;
}
.hh-surname {
    font-weight: 700;
    font-size: 15px;
    color: #3a2810;
    letter-spacing: 0.03em;
}
.hh-meta {
    font-size: 12px;
    color: #7a6040;
    background: #e8ddd0;
    border-radius: 10px;
    padding: 1px 8px;
}
.hh-loc {
    font-size: 12px;
    color: #5a4a38;
    margin-left: auto;
}
.hh-id {
    font-size: 11px;
    color: #9a8a78;
    font-family: monospace;
}
.hh-hebert-links {
    padding: 4px 12px;
    background: #f0f5e8;
    border-bottom: 1px solid #d8cfc4;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.hebert-link-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    background: #e8f0e0;
    border: 1px solid #b0c8a0;
    border-radius: 4px;
    padding: 2px 7px;
    cursor: pointer;
    color: #2a5a1a;
}
.hebert-link-badge:hover { background: #d4e8c8; }
.conf-pill {
    font-size: 10px;
    background: #2a5a1a;
    color: #fff;
    border-radius: 8px;
    padding: 0 5px;
}
.hh-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.hh-table thead tr {
    background: #ede5d8;
}
.hh-table th {
    padding: 4px 10px;
    text-align: left;
    font-size: 11px;
    color: #6a5040;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #d8cfc4;
}
.hh-table td {
    padding: 5px 10px;
    border-bottom: 1px solid #ede8e0;
    color: #2a1a08;
}
.hh-member-row:last-child td { border-bottom: none; }
.hh-member-row:first-child { background: #faf7f4; }
.hh-rel  { color: #7a5030; font-size: 12px; min-width: 60px; }
.hh-name { font-weight: 500; }
.hh-age  { min-width: 40px; color: #5a4030; }
.member-occ { font-size: 12px; color: #5a5040; font-style: italic; }

/* ── Race badges (household table) ── */
.race-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    font-family: Arial, sans-serif;
    padding: 1px 7px;
    border-radius: 10px;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

/* ── Census jump button on Hebert cards ── */
.census-jump-bar {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e8e0d4;
}
.census-jump-btn {
    font-size: 12px;
    color: #1a3a6a;
    background: #eef2f8;
    border: 1px solid #b0bdd8;
    border-radius: 4px;
    padding: 4px 12px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.census-jump-btn:hover {
    background: #1a3a6a;
    color: #fff;
    border-color: #1a3a6a;
}

/* ── Freedman's Bureau search button ── */
.bureau-jump-bar {
    margin-top: 6px;
}
.bureau-jump-btn {
    font-size: 12px;
    color: #2a5a1a;
    background: #eff5eb;
    border: 1px solid #a8c89a;
    border-radius: 4px;
    padding: 4px 12px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.15s, color 0.15s;
}
.bureau-jump-btn:hover {
    background: #2a5a1a;
    color: #fff;
    border-color: #2a5a1a;
    text-decoration: none;
}

/* ── Ember name animation canvas ── */
#ember-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}
.landing-hero,
.landing-dedication {
    position: relative;
    z-index: 1;
}

/* ── Census individual record cards (distinct from Hall) ── */
.census-card {
    border-left: 4px solid #1a3a6a;
}
.census-card:hover { border-color: #1a3a6a; box-shadow: 0 2px 8px rgba(26,58,106,0.14); }
.census-card.expanded { border-color: #1a3a6a; }
.census-card .record-header {
    background: #d8e8f8;
    border-bottom: 1px solid #a8c4e0;
    margin: -12px -16px 12px;
    padding: 10px 16px;
    border-radius: 7px 7px 0 0;
}
.census-id {
    color: #1a3a6a;
    font-weight: 700;
}
.census-occupation {
    font-size: 12px;
    color: #3a5080;
    margin-top: 2px;
}
.badge-census-parish {
    background: #d0daea;
    color: #1a3a6a;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 11px;
}
.census-source-badge {
    font-size: 11px;
    background: #1a3a6a;
    color: #fff;
    border-radius: 4px;
    padding: 2px 8px;
    white-space: nowrap;
    align-self: flex-start;
}

/* ── Guide page ──────────────────────────────────────────────────── */
.guide-page { max-width: 760px; }
.content-page-body h4 {
    font-size: 1rem;
    font-weight: bold;
    color: #2c1810;
    margin: 1.4rem 0 0.4rem;
    font-family: Arial, sans-serif;
}

/* Table of contents */
.guide-toc {
    background: #f9f4eb;
    border: 1px solid #d4c4a0;
    border-radius: 6px;
    padding: 0.9rem 1.2rem;
    margin: 0 0 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.2rem;
    align-items: baseline;
}
.guide-toc-label {
    font-size: 0.8rem;
    font-weight: bold;
    color: #8b6914;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: 100%;
    margin-bottom: 0.2rem;
}
.guide-toc a {
    font-size: 0.88rem;
    color: #2c6090;
    text-decoration: none;
}
.guide-toc a:hover { text-decoration: underline; }

/* Step list */
.guide-steps { margin: 1rem 0 1.5rem; display: flex; flex-direction: column; gap: 0.8rem; }
.guide-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: #fff;
    border: 1px solid #e0d4b0;
    border-radius: 6px;
    padding: 0.85rem 1rem;
}
.guide-step-num {
    flex-shrink: 0;
    width: 1.8rem;
    height: 1.8rem;
    background: #8b6914;
    color: #fff;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
}
.guide-step-body { font-size: 0.92rem; line-height: 1.65; color: #3a2010; font-family: Arial, sans-serif; }

/* Callout boxes */
.guide-callout {
    border-radius: 6px;
    padding: 0.85rem 1.1rem;
    margin: 1.2rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
    font-family: Arial, sans-serif;
}
.guide-callout-tip  { background: #eef6ee; border-left: 4px solid #5a9a5a; color: #2a4a2a; }
.guide-callout-warn { background: #fdf5e8; border-left: 4px solid #c07830; color: #4a2a10; }

/* Archive blocks */
.guide-archive-block {
    border: 1px solid #d4c4a0;
    border-radius: 8px;
    padding: 1rem 1.2rem 0.4rem;
    margin: 0 0 1.2rem;
    background: #fff;
}
.guide-archive-header {
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0.7rem;
    font-family: Arial, sans-serif;
}
.hall-color   { background: #f0e8d0; color: #5a3a10; }
.hebert-color { background: #dce8f0; color: #1a3a5a; }
.census-color { background: #dceadc; color: #1a4a1a; }

/* Cross-link type blocks */
.guide-link-type {
    background: #f9f4eb;
    border-left: 4px solid #8b6914;
    border-radius: 0 6px 6px 0;
    padding: 0.8rem 1rem 0.2rem;
    margin: 0 0 1rem;
}
.guide-link-label {
    font-size: 0.88rem;
    font-weight: bold;
    color: #5a3a10;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
    font-family: Arial, sans-serif;
}

/* Confidence table */
.guide-confidence-table { margin: 1rem 0 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
.guide-conf-row {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: #fff;
    border: 1px solid #e0d4b0;
    border-radius: 6px;
    padding: 0.75rem 1rem;
}
.guide-conf-tier {
    flex-shrink: 0;
    min-width: 180px;
    font-size: 0.85rem;
    font-weight: bold;
    font-family: Arial, sans-serif;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    text-align: center;
}
.guide-conf-tier.strong   { background: #dff0df; color: #1a4a1a; }
.guide-conf-tier.possible { background: #fff0d0; color: #5a3a00; }
.guide-conf-desc { font-size: 0.88rem; line-height: 1.6; color: #3a2010; font-family: Arial, sans-serif; }
