.database-collection-container {
    zoom: .88;
    width: 88%;
    margin-top: 72px;
    margin-bottom: 0;
}
.database-collection-heading {
    display: flex;
    align-items: baseline;
    gap: 18px;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 0;
    color: var(--text-color);
}
.database-collection-heading h2 { margin: 0; font-size: 24px; line-height: 1.4; font-weight: 600; }
.database-collection-heading > span { font-size: 12px; opacity: .55; }
.database-exploration--ageing .database-groups-row { padding-top: 24px; }
#ageing-databases .database-group-title { justify-content: center; font-size: 24px; margin: 0 0 20px; padding: 0; border: 0; text-align: center; }
#ageing-databases .database-group-title::after { content: none; }
#ageing-databases:not(.single-wave-spread-mode):not(.single-wave-collapsing) #single-wave-grid { margin-top: -30px; }
#ageing-databases #harmonized-group .database-grid.harmonized-draw-mode { margin-top: 30px; }
/* Seven ageing cohorts: four rear cards and three centred foreground cards. */
.database-exploration--ageing #single-wave-grid .database-card:nth-child(1) { --fan-x: 50%; --fan-y: 80px; --fan-angle: 0deg; --fan-layer: 12; --fan-scale: .86; }
.database-exploration--ageing #single-wave-grid .database-card:nth-child(2)[data-db="ELSA"] { --fan-x: 73%; --fan-y: 105px; --fan-angle: 4deg; --fan-layer: 11; --fan-scale: .86; }
.database-exploration--ageing #single-wave-grid .database-card:nth-child(3) { --fan-x: 62%; --fan-y: -48px; --fan-angle: 2deg; }
.database-exploration--ageing #single-wave-grid .database-card:nth-child(4) { --fan-x: 84%; --fan-y: -15px; --fan-angle: 6deg; }
.database-exploration--ageing #single-wave-grid .database-card:nth-child(5) { --fan-x: 27%; --fan-y: 105px; --fan-angle: -4deg; --fan-layer: 11; --fan-scale: .86; }
.database-exploration--ageing #single-wave-grid .database-card:nth-child(6) { --fan-x: 16%; --fan-y: -15px; --fan-angle: -6deg; --fan-layer: 1; --fan-scale: .82; }
.database-exploration--ageing #single-wave-grid .database-card:nth-child(7) { --fan-x: 38%; --fan-y: -48px; --fan-angle: -2deg; --fan-layer: 2; --fan-scale: .82; }
.database-collection { --series-accent:#ad424b; --series-paper:#fff; --series-muted:#697073; --strip-base:#e9ece4; --strip-linked:#f4dcd7; --strip-entry:#e1e9ed; --strip-tape:#d8d1b880; --series-coral:#b85548; --series-rose:#be7696; }
:root:not([data-theme="light"]) .database-collection { --series-accent:#f0acb2; --series-paper:#232525; --series-muted:#afb5b3; --strip-base:#3b453e; --strip-linked:#593f42; --strip-entry:#37454c; --strip-tape:#acb1a34d; --series-coral:#eaa596; --series-rose:#e4b2ca; }
.database-card-board, .database-card-board * { box-sizing:border-box; letter-spacing:0; }
/* Match the note catalogue's content-height masonry, with a stable three-column layout. */
.database-board-stage { position:relative; }
.nhanes-continuity { position:absolute; inset:0; z-index:1; width:100%; height:100%; overflow:visible; pointer-events:none; color:var(--series-accent); }
.nhanes-continuity path { fill:none; stroke:currentColor; stroke-width:1; stroke-linecap:round; stroke-linejoin:round; opacity:.65; }
.nhanes-continuity text { fill:var(--series-muted); font:12px sans-serif; }
.database-card-board { display:grid; grid-template-columns:minmax(0,.78fr) minmax(0,1fr) minmax(0,1.22fr); grid-auto-flow:row dense; align-items:start; gap:24px; padding:12px 10px 32px; }
.database-card-board.is-masonry { grid-auto-rows:8px; }
#nutrition-databases .database-card-board > .database-card[data-db="NHANES"] { order:6; grid-column:2; width:86%; }
#nutrition-databases .database-card-board > .database-card[data-db="CHNS"] { order:2; grid-column:2; width:82%; justify-self:end; }
#nutrition-databases .database-card-board > .database-card[data-db="KNHANES"] { order:5; grid-column:2; width:90%; justify-self:center; }
.database-card-board > .historical-series { --card-tilt:.5deg; order:1; grid-column:1; }
.database-card-board > .nhis-series { --card-tilt:-.4deg; order:3; grid-column:3; }
#nutrition-databases .database-collection-grid > .database-card {
    --card-tilt:-.5deg; position:relative; width:100%; min-width:0; max-width:none; padding:24px;
    border:1px solid var(--border-color); border-radius:5px; transform:rotate(var(--card-tilt)); animation:none;
    background:var(--series-paper); box-shadow:0 5px 12px #0000000b; backdrop-filter:none;
}
#nutrition-databases .database-collection-grid > .database-card:nth-child(2) { --card-tilt:.4deg; }
#nutrition-databases .database-collection-grid > .database-card:nth-child(3) { --card-tilt:-.3deg; }
#nutrition-databases .database-collection-grid > .database-card:is(:hover,.card-hover-delay) { transform:translateY(-3px) rotate(var(--card-tilt)); border-color:var(--border-color); background:var(--series-paper); box-shadow:0 8px 18px #00000014; }
.database-collection-grid .db-card-kicker { display:block; color:var(--series-muted); font-size:11px; }
.database-collection-grid .db-header { display:block; position:relative; margin:16px 0 0; padding-right:65px; min-height:78px; }
.database-collection-grid .db-icon { position:absolute; right:-8px; top:8px; width:60px; height:60px; }
.database-collection-grid .db-title { min-width:0; }
.database-collection-grid .db-name { font-size:30px; line-height:1.2; color:var(--series-accent); }
.database-collection-grid [data-db="CHNS"] .db-name { color:var(--series-coral); }
.database-collection-grid [data-db="KNHANES"] .db-name { color:var(--series-rose); }
.database-collection-grid .db-full-name { height:auto; display:block; overflow:visible; font-size:12px; line-height:1.6; font-style:normal; overflow-wrap:anywhere; opacity:1; color:var(--series-muted); }
.database-collection-grid .db-stats { flex-direction:row; justify-content:space-between; gap:12px; margin:18px 0 14px; padding:12px 0 0; border-bottom:0; }
.database-collection-grid .stat-item { flex:1; flex-direction:column; align-items:flex-start; gap:5px; min-width:0; }
.database-collection-grid .stat-item :is(.stat-label,.stat-value) { width:auto; justify-content:flex-start; align-items:flex-start; text-align:left; }
.database-collection-grid .stat-label { font-size:12px; }
.database-collection-grid .stat-value { font-size:18px; font-weight:500; font-variant-numeric:tabular-nums; }
.database-collection-grid .db-card-footer { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.database-collection-grid .db-card-footer > small { font-size:11px; color:var(--series-muted); }
.database-collection-grid .db-actions { justify-content:flex-end; gap:8px; margin:0; }
#nutrition-databases .database-collection-grid .db-actions > * { flex:0 0 auto; min-width:36px; height:30px; padding:0 9px; border:1px solid var(--border-color); border-radius:3px; background:var(--series-paper); color:var(--text-color); font-size:12px; box-shadow:none; }
#nutrition-databases .database-collection-grid .db-actions > a:hover { border-color:var(--series-accent); color:var(--series-accent); transform:none; }
.database-series { padding:24px; background:var(--series-paper); border:1px solid var(--border-color); border-radius:7px; color:var(--text-color); box-shadow:0 6px 16px #00000012; min-width:0; transform:rotate(var(--card-tilt,0deg)); transition:transform .2s ease,box-shadow .2s ease; }
.database-series:hover { transform:translateY(-3px) rotate(var(--card-tilt,0deg)); box-shadow:0 10px 22px #00000018; }
/* Match the ageing cards' translucent surface without changing collection colors. */
#nutrition-databases {
    --collection-card-bg:rgba(255,255,255,.85);
    --collection-card-shadow:inset 0 1px 0 #ffffffb3, 0 3px 7px #0000000a, 0 10px 24px #00000014;
    --collection-card-hover-shadow:inset 0 1px 0 #ffffffcc, 0 5px 10px #0000000d, 0 16px 30px #00000021;
}
:root:not([data-theme="light"]) #nutrition-databases {
    --text-color:#e5e5e5;
    --series-muted:#bfc4c2;
    --collection-card-bg:rgba(35,35,35,.9);
    --collection-card-shadow:0 4px 10px #0003, 0 12px 24px #00000040;
    --collection-card-hover-shadow:0 6px 14px #0004, 0 18px 30px #00000050;
}
#nutrition-databases .database-card-board > :is(.database-card,.database-series) {
    transition:transform .5s cubic-bezier(.25,.46,.45,.94), box-shadow .5s cubic-bezier(.25,.46,.45,.94);
    background:var(--collection-card-bg);
    background-clip:padding-box;
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
    box-shadow:var(--collection-card-shadow);
}
#nutrition-databases .database-card-board > :is(.database-card,.database-series):is(:hover,.card-hover-delay) {
    transform:translateY(-8px) rotate(var(--card-tilt,0deg)) scale(1.035);
    z-index:30;
    background:var(--collection-card-bg);
    background-clip:padding-box;
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
    box-shadow:var(--collection-card-hover-shadow);
}
:root:not([data-theme="light"]) #nutrition-databases .database-card-board > :is(.database-card,.database-series),
:root:not([data-theme="light"]) #nutrition-databases .database-card-board > :is(.database-card,.database-series):is(:hover,.card-hover-delay) {
    border:1px solid rgba(50,50,50,.8);
    border-radius:12px;
}
.series-overview { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:24px; }
:root:not([data-theme="light"]) #nutrition-databases .stat-label {
    color:var(--series-muted);
    opacity:1;
}
:root:not([data-theme="light"]) #nutrition-databases .stat-value {
    color:var(--text-color);
}
/* Restore the ageing deck's translucent frosted surface. */
#ageing-databases { --ageing-card-surface:rgba(255,255,255,.85); }
:root:not([data-theme="light"]) #ageing-databases { --ageing-card-surface:rgba(35,35,35,.9); }
#ageing-databases .database-card,
#ageing-databases .database-card:is(:hover,.card-hover-delay) {
    background:var(--ageing-card-surface);
    backdrop-filter:blur(8px);
    -webkit-backdrop-filter:blur(8px);
}
.series-kicker { font-size:12px; color:var(--series-muted); }
.series-overview h3 { font-size:24px; font-weight:600; line-height:1.35; margin:5px 0 0; }
.series-overview h3 > span { font-weight:400; }
.series-catalog-link { display:inline-flex; align-items:center; gap:10px; color:var(--text-color); font-size:12px; text-decoration:none; white-space:nowrap; padding:8px 0; }
.series-catalog-link:hover { color:var(--series-accent); text-decoration:none; }
.series-catalog-link i { font-size:11px; transform:rotate(-45deg); }
.database-series .survey-strip {
    --strip:var(--strip-base); --tilt:-1.2deg; position:relative; isolation:isolate; display:inline-flex; align-items:center; justify-content:center;
    gap:10px; min-height:40px; max-width:100%; padding:9px 17px; border:0; border-radius:0; background:none;
    color:var(--text-color); font:inherit; font-size:14px; line-height:1.5; text-decoration:none; overflow-wrap:anywhere;
    transform:rotate(var(--tilt)); filter:drop-shadow(1px 2px 1px #00000016);
}
.database-series .survey-strip::before { content:""; position:absolute; inset:0; z-index:-1; background:var(--strip); clip-path:polygon(2% 0,28% 2%,61% 0,98% 1%,97% 17%,100% 34%,98% 56%,100% 75%,98% 99%,71% 97%,40% 100%,0 98%,2% 76%,0 57%,2% 36%,0 18%); }
.database-series .survey-strip::after { content:""; position:absolute; z-index:-1; width:32px; height:10px; top:-4px; left:calc(50% - 16px); background:var(--strip-tape); transform:rotate(-3deg); }
.database-series .survey-strip:nth-child(2n) { --tilt:1deg; }
.database-series .survey-strip:nth-child(3n) { --tilt:-.5deg; }
.database-series .survey-strip:hover { color:var(--series-accent); transform:translateY(-2px) rotate(var(--tilt)); filter:drop-shadow(1px 4px 2px #00000020); }
.historical-series .series-overview { display:block; margin-bottom:18px; }
.historical-series h3 > span { display:block; font-size:20px; }
.historical-series .series-catalog-link { margin-top:8px; }
.historical-timeline { list-style:none; padding:0 0 0 20px; margin:0 0 0 4px; border-left:1px solid var(--border-color); }
.historical-timeline-item { position:relative; padding:0 0 22px; }
.historical-timeline-item:last-child { padding-bottom:4px; }
.historical-timeline-item::before { content:""; position:absolute; left:-24px; top:6px; width:7px; height:7px; border-radius:50%; background:var(--series-muted); }
.timeline-period { display:block; font-size:12px; color:var(--series-muted); font-variant-numeric:tabular-nums; margin-bottom:9px; }
.historical-timeline .survey-strip { font-size:13px; padding:8px 13px; min-height:36px; }
.timeline-branch { position:relative; margin:12px 0 0 12px; padding:0 0 0 16px; border-left:1px solid var(--series-accent); }
.timeline-branch::before { content:""; position:absolute; left:0; top:9px; width:9px; border-top:1px solid var(--series-accent); }
.timeline-branch .followup-connector { display:block; font-size:11px; margin-bottom:10px; }
.timeline-branch .timeline-period { margin:8px 0 0; }
.historical-followup .survey-strip { --strip:var(--strip-linked); }
.followup-connector { display:inline-flex; align-items:center; gap:8px; color:var(--series-accent); font-size:12px; white-space:nowrap; }
.historical-related { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-top:22px; padding-top:18px; border-top:1px solid var(--border-color); }
.historical-related small { color:var(--series-muted); font-size:12px; }
.historical-related .survey-strip { --strip:var(--strip-entry); }
.nhis-series { scroll-margin-top:90px; }
.nhis-series .series-overview { flex-wrap:wrap; gap:8px; }
.nhis-series .series-overview h3 { font-size:30px; }
.series-totals { font-size:12px; color:var(--series-muted); margin:6px 0 0; }
.nhis-series-browser { position:relative; min-width:0; }
.nhis-series-tabs { position:relative; display:flex; align-items:center; flex-wrap:wrap; gap:18px 14px; padding:5px 2px 23px; border-bottom:1px solid var(--border-color); }
.nhis-series-tabs button { cursor:pointer; }
.nhis-series-tabs button span { font-size:11px; opacity:.8; font-variant-numeric:tabular-nums; }
.nhis-series-tabs button[aria-selected="true"] { --strip:var(--strip-linked); color:var(--series-accent); }
.nhis-category-caption { position:relative; margin:26px 0 0; padding-left:12px; color:var(--series-accent); font-size:12px; line-height:20px; }
.nhis-caption-arrow { display:inline-block; width:30px; height:26px; margin-left:6px; vertical-align:top; margin-bottom:-6px; overflow:visible; }
.nhis-category-connector { position:absolute; inset:0; width:100%; height:100%; overflow:visible; pointer-events:none; }
.nhis-category-connector path, .nhis-caption-arrow path { fill:none; stroke:var(--series-accent); stroke-width:1; stroke-linecap:round; stroke-linejoin:round; opacity:.65; }
/* Preserve all catalogue entries without stretching the homepage for 76 topics. */
.nhis-series-panel { display:flex; flex-wrap:wrap; align-content:flex-start; align-items:flex-start; gap:20px 16px; min-height:212px; max-height:var(--nhis-panel-limit,212px); overflow:auto; scrollbar-width:thin; scrollbar-color:var(--border-color) transparent; padding:24px 6px 12px; }
.nhis-series-panel[hidden] { display:none; }
.nhis-series-panel .survey-strip { --strip:var(--strip-entry); text-align:left; justify-content:space-between; max-width:calc(100% - 4px); }
.nhis-series-entry i { font-size:11px; transform:rotate(-45deg); flex-shrink:0; }
.database-series :is(a,button):focus-visible { outline:2px solid var(--series-accent); outline-offset:4px; }

/* Match the flat, uneven paper edges used by note insight blocks. */
.features-nav-layout, .home-membership__inner {
    position:relative;
    isolation:isolate;
    --outer-paper:#f8f8f8;
    --outer-paper-accent:var(--color-uk,#4da076);
}
.home-membership__inner { --outer-paper-accent:var(--color-europe,#9b59b6); }
.home-membership { padding-top:190px; padding-bottom:156px; }
.features-nav-layout { padding-block:26px; }
:root:not([data-theme="light"]) :is(.features-nav-layout,.home-membership__inner) {
    --outer-paper:#242424;
}
.features-nav-layout::before, .home-membership__inner::before {
    content:"";
    position:absolute;
    inset:-20px -22px;
    z-index:-1;
    pointer-events:none;
    background:var(--outer-paper);
    clip-path:polygon(0 9px, calc(100% - 7px) 0, 100% calc(100% - 8px), 8px 100%);
}
.home-membership__inner::before { inset:-30px -28px; }
.features-nav-layout::after, .home-membership__inner::after {
    content:"";
    position:absolute;
    left:2px;
    bottom:-13px;
    width:44px;
    height:4px;
    background:var(--outer-paper-accent);
    opacity:.7;
    clip-path:polygon(0 42%, 69% 0, 100% 47%, 91% 100%, 13% 70%);
    pointer-events:none;
}
.features-nav-layout::after {
    left:4px;
    bottom:-9px;
    width:78px;
    height:17px;
    clip-path:polygon(0 60%, 6% 32%, 67% 8%, 94% 0, 100% 15%, 72% 35%, 25% 61%, 89% 52%, 97% 67%, 63% 85%, 9% 100%, 4% 84%, 51% 60%);
}
.home-membership__inner::after {
    left:-19px;
    top:-13px;
    bottom:auto;
    width:12px;
    height:66px;
    clip-path:polygon(0 0, 66% 3%, 51% 26%, 100% 7%, 88% 44%, 55% 100%, 40% 89%, 48% 53%, 20% 72%, 12% 41%);
}
:root .features-nav-layout #world-map-wrapper {
    background:transparent !important;
}
:root .world-map-wrapper #world-map-container > svg,
:root .world-map-wrapper :is(.country-db-table-wrapper,.db-description-wrapper) {
    background:transparent;
}

