:root {
  --ink: #262626;
  --muted: #716b63;
  --paper: #f7f3eb;
  --white: #fffdf9;
  --gold: #af8a49;
  --gold-dark: #745f34;
  --coral: #df665e;
  --teal: #158f85;
  --line: #d9cfc0;
  --shadow: 0 26px 70px rgba(49, 39, 29, 0.12);
}

@theme inline {
  --font-sans: var(--font-geist-sans);
  --font-serif: var(--font-merriweather);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-geist-sans), Arial, sans-serif; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { color: inherit; }

.site-header { height: 82px; padding: 0 clamp(24px, 5vw, 82px); display: grid; grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr); align-items: center; border-bottom: 1px solid rgba(47, 43, 39, .13); background: rgba(255, 253, 249, .95); position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 12px; width: fit-content; text-decoration: none; }
.brand img { width: 132px; height: 56px; object-fit: contain; object-position: left center; }
.brand span { max-width: 150px; line-height: 1.25; font-size: 11px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-dark); border-left: 1px solid var(--line); padding-left: 13px; }
.brand--compact img { width: 150px; }
.site-header nav { display: flex; height: 100%; align-items: center; gap: 32px; }
.site-header nav a { text-decoration: none; text-transform: uppercase; letter-spacing: .09em; font-size: 12px; font-weight: 700; position: relative; }
.site-header nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -8px; height: 2px; background: var(--gold); transition: .2s; }
.site-header nav a:hover::after { right: 0; }
.help-button { justify-self: end; display: flex; align-items: center; gap: 8px; border: 1px solid var(--ink); background: transparent; border-radius: 999px; padding: 10px 15px; font-size: 12px; font-weight: 700; cursor: pointer; }
.help-button:hover { background: var(--ink); color: white; }
.mobile-menu { display: none; border: 0; background: none; }

.hero { min-height: 620px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr); gap: clamp(42px, 7vw, 110px); align-items: center; padding: 80px clamp(24px, 7vw, 125px) 94px; background: linear-gradient(112deg, rgba(255,253,248,.94), rgba(236,226,210,.84)), repeating-linear-gradient(-11deg, transparent 0 45px, rgba(110,90,60,.035) 46px 47px); position: relative; overflow: hidden; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero::before { width: 500px; height: 500px; right: -240px; top: -180px; border: 1px solid rgba(175,138,73,.22); box-shadow: 0 0 0 70px rgba(175,138,73,.03), 0 0 0 140px rgba(175,138,73,.025); }
.hero::after { height: 4px; width: 38%; bottom: 0; left: 0; border-radius: 0; background: linear-gradient(90deg, #b55fb2 0 35%, #ff5768 35% 67%, #f1b94e 67%); box-shadow: 38vw 0 var(--teal); }
.hero-copy { max-width: 800px; position: relative; z-index: 1; }
.eyebrow { margin: 0 0 14px; display: flex; align-items: center; gap: 7px; color: var(--gold-dark); text-transform: uppercase; letter-spacing: .16em; font-size: 11px; font-weight: 800; }
h1, h2, h3 { margin: 0; line-height: 1.08; }
h1 { max-width: 760px; font-family: var(--font-merriweather), Georgia, serif; font-size: clamp(50px, 6.7vw, 96px); font-weight: 400; letter-spacing: -.045em; }
h1 em { color: var(--gold-dark); font-weight: 400; }
h2 { font-family: var(--font-merriweather), Georgia, serif; font-size: clamp(34px, 4vw, 55px); font-weight: 400; letter-spacing: -.035em; }
h3 { font-family: var(--font-merriweather), Georgia, serif; font-size: 25px; font-weight: 400; }
.hero-lead { max-width: 660px; margin: 28px 0 32px; color: #574f46; font-size: 18px; line-height: 1.7; }
.hero-search { max-width: 750px; background: var(--white); border: 1px solid #bdad97; box-shadow: var(--shadow); border-radius: 16px; overflow: hidden; }
.scope-switch { display: flex; gap: 4px; padding: 7px; background: #e5ded3; }
.scope-switch button { border: 0; background: transparent; padding: 9px 14px; border-radius: 9px; display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; cursor: pointer; color: #71695f; }
.scope-switch button.active { background: var(--white); color: var(--ink); box-shadow: 0 4px 13px rgba(50,45,38,.07); }
.scope-switch button span { border-radius: 20px; padding: 2px 7px; background: rgba(42,39,35,.08); font-size: 10px; }
.search-line { height: 68px; display: flex; align-items: center; gap: 14px; padding: 8px 9px 8px 20px; }
.search-line > svg { color: #847a6d; }
.search-line input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: 15px; }
.search-line button { border: 0; background: var(--ink); color: white; border-radius: 10px; padding: 14px 20px; display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; }
.search-line button:hover { background: var(--gold-dark); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 22px; color: #685f55; font-size: 11px; }
.hero-meta span { display: flex; align-items: center; gap: 5px; }
.hero-meta svg { color: var(--teal); }
.hero-card { min-height: 410px; padding: 30px; border-radius: 22px; background: rgba(42,39,36,.97); color: white; box-shadow: 18px 22px 0 rgba(173,138,77,.14); position: relative; z-index: 1; }
.hero-card-top { display: flex; justify-content: space-between; align-items: center; color: #d9c6a7; }
.hero-card-top p { font-size: 11px; text-transform: uppercase; letter-spacing: .15em; font-weight: 700; }
.hero-total { display: block; margin-top: 46px; font-family: var(--font-merriweather), Georgia, serif; font-size: clamp(43px, 5vw, 64px); font-weight: 400; }
.hero-card > span { color: #c9c3b9; font-size: 13px; }
.mini-spectrum { height: 110px; display: flex; gap: 8px; align-items: end; margin: 40px 0 26px; border-bottom: 1px solid rgba(255,255,255,.22); }
.mini-spectrum div { height: 100%; flex: 1; position: relative; display: flex; align-items: end; }
.mini-spectrum div span { display: block; width: 100%; background: linear-gradient(#d9bd86, #806b43); border-radius: 3px 3px 0 0; position: relative; }
.mini-spectrum small { font-size: 9px; position: absolute; bottom: -18px; color: #a7a095; }
.mini-spectrum b { position: absolute; top: -20px; font-size: 9px; font-weight: 500; }
.hero-card-note { display: flex; align-items: flex-start; gap: 8px; padding-top: 15px; color: #c2b9aa; font-size: 11px; line-height: 1.5; border-top: 1px solid rgba(255,255,255,.12); }
.hero-card-note svg { flex: 0 0 auto; color: #d9bd86; }

.onboarding { max-width: 1180px; margin: -31px auto 40px; position: relative; z-index: 4; display: grid; grid-template-columns: auto 1fr auto auto; gap: 17px; align-items: center; padding: 17px 20px; background: var(--white); border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 15px 40px rgba(50,43,36,.12); }
.onboarding-icon { width: 40px; height: 40px; border-radius: 10px; background: #e3d5bb; color: var(--gold-dark); display: grid; place-items: center; }
.onboarding strong { font-size: 14px; }
.onboarding p { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.onboarding > button { display: flex; align-items: center; gap: 7px; border: 0; background: transparent; color: var(--gold-dark); cursor: pointer; font-weight: 750; font-size: 12px; }
.onboarding .onboarding-close { color: var(--muted); padding: 8px; }

.section { max-width: 1320px; margin: 0 auto; padding: 92px clamp(24px, 5vw, 68px); }
.section--split { padding-top: 70px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 42px; }
.section-heading > div:first-child > p:last-child { max-width: 600px; color: var(--muted); line-height: 1.6; }
.legend { display: flex; align-items: center; gap: 16px; font-size: 11px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 7px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot--gold { background: var(--gold); }
.info-tip { display: inline-grid; place-items: center; width: 24px; height: 24px; position: relative; border-radius: 50%; color: var(--gold-dark); cursor: help; }
.info-tip::after { content: attr(data-tip); position: absolute; width: 235px; bottom: calc(100% + 9px); right: -8px; background: var(--ink); color: white; padding: 10px 12px; border-radius: 8px; font-size: 11px; line-height: 1.4; opacity: 0; pointer-events: none; transform: translateY(4px); transition: .16s; z-index: 60; text-transform: none; letter-spacing: normal; font-weight: 500; }
.info-tip:hover::after, .info-tip:focus::after { opacity: 1; transform: translateY(0); }
.top-chart { border-top: 1px solid var(--line); }
.top-row { width: 100%; height: 58px; display: grid; grid-template-columns: 40px 190px 1fr 85px 20px; gap: 16px; align-items: center; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.top-row:hover { background: rgba(255,255,255,.65); }
.top-row:hover .top-track i { background: var(--coral); }
.rank { font-family: var(--font-geist-mono); color: #9a9083; font-size: 11px; }
.top-name { font-weight: 650; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-track { height: 12px; background: #e5dccf; display: block; }
.top-track i { display: block; height: 100%; background: var(--gold); transition: .2s; }
.top-row strong { text-align: right; font-size: 12px; }

.sources-section { background: var(--white); max-width: none; padding-left: max(24px, calc((100vw - 1184px) / 2)); padding-right: max(24px, calc((100vw - 1184px) / 2)); }
.source-tools label { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; }
select { border: 1px solid var(--line); border-radius: 8px; background: var(--white); padding: 10px 30px 10px 10px; color: var(--ink); outline-color: var(--gold); }
.source-table-wrap, .table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; }
th { padding: 13px 15px; background: #e8e0d4; color: #5f584f; text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
th .info-tip { display: inline-grid; vertical-align: middle; }
td { padding: 16px 15px; border-bottom: 1px solid #e8e1d7; font-size: 12px; color: #59534b; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #faf7f1; }
td strong { display: block; color: var(--ink); font-size: 13px; }
td small { display: block; margin-top: 4px; color: #989084; font-size: 9px; }
td a { color: var(--gold-dark); display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }
.row-button { display: flex; align-items: center; gap: 6px; white-space: nowrap; border: 1px solid var(--ink); background: transparent; border-radius: 999px; padding: 7px 11px; cursor: pointer; font-size: 10px; font-weight: 700; }
.row-button:hover { background: var(--ink); color: white; }
.method-badge { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 750; white-space: nowrap; }
.method-badge--manualna { color: #6c542c; background: #eee0c6; }
.method-badge--automatyczna { color: #176e68; background: #d7ece8; }
.method-badge--nieustalona { color: #716b63; background: #e8e2d9; }
.show-more { margin: 28px auto 0; display: flex; align-items: center; gap: 7px; border: 0; background: transparent; color: var(--gold-dark); font-weight: 750; cursor: pointer; }
.show-more--light { color: #d7ba83; }
.results-note { margin: -20px 0 18px; color: var(--muted); font-size: 12px; }
.empty-state { padding: 28px; text-align: center; color: var(--muted); font-size: 13px; }

.catalog-section { background: #292826; color: white; }
.catalog-intro { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 40px; margin-bottom: 44px; }
.catalog-intro p:last-child { color: #bbb4ab; max-width: 660px; line-height: 1.6; }
.catalog-stat { text-align: right; border-left: 1px solid #5c564e; padding-left: 30px; }
.catalog-stat strong { font-family: var(--font-merriweather), Georgia, serif; font-weight: 400; display: block; color: #d5b579; font-size: 50px; }
.catalog-stat span { color: #a9a198; font-size: 11px; }
.catalog-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 22px; }
.catalog-chart-card, .catalog-list-card { background: #34322f; border: 1px solid #504c47; border-radius: 14px; padding: 28px; }
.card-heading { display: flex; align-items: start; justify-content: space-between; margin-bottom: 28px; }
.card-heading h3 { font-size: 22px; }
.catalog-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.catalog-filters label { display: grid; gap: 7px; color: #aaa39a; font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.catalog-filters select { width: 100%; background: #292826; color: white; border-color: #59534d; }
.catalog-row { display: grid; grid-template-columns: 35px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 56px; border-bottom: 1px solid #4b4742; }
.catalog-main-link { min-width: 0; color: inherit; text-decoration: none; }
.catalog-row:hover .catalog-main-link strong, .catalog-main-link:hover strong { color: #d6bb86; }
.catalog-ipbl-badge { border: 1px solid #d6bb86; background: transparent; color: #d6bb86; border-radius: 999px; padding: 5px 8px; cursor: pointer; font-size: 9px; font-weight: 800; letter-spacing: .05em; }
.catalog-ipbl-badge:hover, .catalog-ipbl-badge:focus { background: #d6bb86; color: #292826; outline: none; }
.catalog-index { font-family: var(--font-geist-mono); color: #89827a; font-size: 10px; }
.catalog-row strong { display: block; font-size: 12px; }
.catalog-row small { display: block; color: #9d958c; font-size: 9px; margin-top: 4px; text-transform: uppercase; letter-spacing: .05em; }
.catalog-list-card .results-note { margin: 0 0 12px; color: #bdb6ad; }
.results-note--filters { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 7px 5px 10px; border: 1px solid #6b6258; border-radius: 999px; background: rgba(213,181,121,.08); color: #e2cfaa; }
.filter-chip button { width: 22px; height: 22px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.08); color: inherit; cursor: pointer; padding: 0; }
.filter-chip button:hover, .filter-chip button:focus { background: #d6bb86; color: #292826; outline: none; }

.bars { display: grid; gap: 11px; }
.bar-row { display: grid; grid-template-columns: minmax(95px, 155px) 1fr 50px; gap: 10px; align-items: center; font-size: 10px; }
.bar-label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #c8c1b7; }
.bar-track { height: 9px; background: rgba(255,255,255,.09); }
.bar-track span { height: 100%; display: block; background: var(--gold); }
.bars--teal .bar-track span { background: var(--teal); }
.bars--coral .bar-track span { background: var(--coral); }
.bar-row strong { text-align: right; font-size: 10px; }

.about { display: grid; grid-template-columns: 75px .8fr 1.2fr; gap: 42px; align-items: start; }
.about-number { width: 62px; height: 62px; display: grid; place-items: center; border: 1px solid var(--gold); color: var(--gold-dark); border-radius: 50%; font-family: var(--font-merriweather), Georgia, serif; font-size: 30px; font-style: italic; }
.about-copy { color: var(--muted); line-height: 1.75; font-size: 14px; }
.about-copy p:first-child { margin-top: 0; }
.about-copy a { color: var(--gold-dark); display: inline-flex; align-items: center; gap: 4px; }
.about--app { border-top: 1px solid var(--line); padding-top: 72px; }
.about-number--version { font-size: 17px; font-style: normal; }
footer { padding: 52px clamp(24px, 6vw, 90px) 24px; background: #eee9df; color: var(--ink); border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr .55fr 1.3fr 1fr; gap: clamp(28px, 4vw, 58px); align-items: start; }
footer p { color: #716b63; font-size: 11px; line-height: 1.6; }
.footer-intro .brand { margin-bottom: 14px; }
.footer-intro .brand img, .footer-logo img { filter: grayscale(1); opacity: .62; transition: filter .22s, opacity .22s, transform .22s; }
.footer-intro .brand:hover img, .footer-logo:hover img { filter: none; opacity: 1; transform: translateY(-2px); }
.footer-links { display: grid; gap: 12px; }
.footer-links a, .footer-links button { color: #665f56; text-decoration: none; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font-size: 11px; }
.footer-links a:hover, .footer-links button:hover { color: var(--gold-dark); }
.footer-institutions > span, .footer-funding > span:first-child { display: block; color: #827a70; font-size: 9px; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 14px; }
.footer-logo-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 18px; }
.footer-logo { height: 94px; display: flex; align-items: center; justify-content: center; background: transparent; }
.footer-logo img { display: block; max-width: 100%; max-height: 88px; width: auto; height: auto; object-fit: contain; }
.footer-logo--wide { width: min(100%, 245px); justify-content: flex-start; }
.footer-logo--wide img { max-height: 88px; }
.footer-note { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid #d2c8b9; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(24,22,20,.78); backdrop-filter: blur(6px); padding: 22px; display: grid; place-items: center; }
.source-modal { width: min(1180px, 100%); max-height: calc(100vh - 44px); overflow: auto; background: var(--paper); border-radius: 18px; box-shadow: 0 35px 100px rgba(0,0,0,.4); padding: 38px; position: relative; }
.modal-close { position: absolute; top: 15px; right: 15px; width: 38px; height: 38px; border: 0; background: #e9e1d6; border-radius: 50%; cursor: pointer; display: grid; place-items: center; z-index: 3; }
.modal-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; padding-right: 30px; }
.modal-heading h2 { font-size: 43px; }
.modal-heading > div > p:last-child { color: var(--muted); font-size: 12px; }
.modal-heading a { display: inline-flex; align-items: center; gap: 5px; color: var(--gold-dark); }
.button { display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 9px; padding: 12px 16px; cursor: pointer; font-weight: 700; }
.button--dark { background: var(--ink); color: white; }
.button--gold { background: var(--gold); color: white; }
.export-menu { position: relative; }
.export-popover { display: none; position: absolute; right: 0; top: 100%; min-width: 170px; padding: 6px; background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); z-index: 4; }
.export-menu:hover .export-popover, .export-menu:focus-within .export-popover { display: grid; }
.export-popover button { border: 0; background: none; display: flex; align-items: center; gap: 8px; padding: 9px; border-radius: 7px; cursor: pointer; text-align: left; }
.export-popover button:hover { background: var(--paper); }
.export-popover button:disabled { opacity: .4; cursor: wait; }
.modal-kpis { display: grid; grid-template-columns: repeat(4, 1fr); margin: 32px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.modal-kpis div { padding: 20px; border-right: 1px solid var(--line); }
.modal-kpis div:last-child { border-right: 0; }
.modal-kpis span { display: block; text-transform: uppercase; letter-spacing: .1em; font-size: 9px; color: var(--muted); }
.modal-kpis strong { display: block; font-family: var(--font-merriweather), Georgia, serif; font-size: 26px; font-weight: 400; margin-top: 8px; }
.modal-kpis small { color: #999084; font-size: 9px; }
.analysis-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); }
.analysis-tabs button { border: 0; background: none; padding: 12px 15px; color: var(--muted); font-size: 11px; cursor: pointer; border-bottom: 2px solid transparent; }
.analysis-tabs button.active { color: var(--ink); font-weight: 750; border-color: var(--gold); }
.analysis-panel { display: grid; grid-template-columns: .33fr .67fr; gap: 35px; min-height: 300px; align-items: center; padding: 28px 0 40px; }
.analysis-copy p:last-child { color: var(--muted); line-height: 1.6; font-size: 12px; }
.analysis-visual .bars .bar-label { color: var(--muted); }
.analysis-visual .bar-track { background: #e0d8cc; }
.year-chart { width: 100%; height: auto; overflow: visible; }
.axis { stroke: #b9aa96; }
.chart-column { fill: var(--gold); transition: .2s; }
.chart-column-group { outline: none; }
.chart-column-group:hover .chart-column, .chart-column-group:focus .chart-column { fill: var(--coral); }
.chart-tooltip { opacity: 0; pointer-events: none; transition: opacity .15s; }
.chart-column-group:hover .chart-tooltip, .chart-column-group:focus .chart-tooltip { opacity: 1; }
.chart-tooltip rect { fill: var(--ink); }
.chart-tooltip text { fill: white; font-size: 9px; font-weight: 700; font-family: var(--font-geist-sans); }
.chart-label, .chart-max { fill: #71695e; font-size: 9px; font-family: var(--font-geist-sans); }
.records-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 18px; }
.records-heading h3 { font-size: 27px; }
.table-search { min-width: 270px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: white; border: 1px solid var(--line); border-radius: 9px; }
.table-search input { border: 0; outline: 0; width: 100%; background: transparent; font-size: 12px; }
.table-wrap { background: white; }
.table-wrap th { position: sticky; top: 0; z-index: 1; }
.table-wrap td { max-width: 300px; line-height: 1.45; }
.keywords-cell { min-width: 250px; }
.metadata-link { color: var(--gold-dark); text-decoration: underline; text-decoration-color: rgba(116,95,52,.35); text-underline-offset: 2px; }
.term-separator { color: #9a9185; }
.pagination { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; color: var(--muted); font-size: 11px; }
.pagination div { display: flex; align-items: center; gap: 10px; }
.pagination button { border: 1px solid var(--line); background: white; border-radius: 7px; padding: 7px 11px; cursor: pointer; }
.pagination button:disabled { opacity: .4; cursor: default; }
.loading, .error-box { padding: 40px; text-align: center; color: var(--muted); }
.loading span { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--gold); border-radius: 50%; display: inline-block; vertical-align: middle; margin-right: 8px; animation: spin .8s linear infinite; }
.error-box { color: #a5403b; background: #f8dfdc; border-radius: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

.help-modal { width: min(600px, 100%); background: var(--paper); border-radius: 18px; padding: 45px; position: relative; box-shadow: var(--shadow); }
.help-modal h2 { font-size: 38px; }
.help-modal ol { list-style: none; padding: 0; margin: 35px 0; display: grid; gap: 22px; }
.help-modal li { display: grid; grid-template-columns: 38px 1fr; gap: 14px; }
.help-modal li > span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #e2d4bb; color: var(--gold-dark); font-family: var(--font-merriweather), Georgia, serif; }
.help-modal li strong { font-size: 14px; }
.help-modal li p { margin: 4px 0 0; color: var(--muted); line-height: 1.5; font-size: 12px; }
.help-note { margin: -8px 0 28px; padding: 12px 14px; border-left: 3px solid var(--gold); background: #eee5d7; color: #625b52; font-size: 11px; line-height: 1.55; }

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto auto; }
  .site-header nav { display: none; position: absolute; top: 82px; left: 0; right: 0; height: auto; padding: 25px; background: white; flex-direction: column; align-items: flex-start; }
  .site-header nav.open { display: flex; }
  .mobile-menu { display: block; }
  .hero { grid-template-columns: 1fr; padding-top: 65px; }
  .hero-card { min-height: 340px; }
  .catalog-grid { grid-template-columns: 1fr; }
  .about { grid-template-columns: 60px 1fr; }
  .about-copy { grid-column: 2; }
  footer { grid-template-columns: 1fr 1fr; }
  .footer-institutions { grid-column: 1 / -1; }
  .footer-note { grid-column: 1 / -1; }
  .analysis-panel { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .site-header { height: 70px; padding: 0 18px; }
  .site-header nav { top: 70px; }
  .brand img { width: 112px; }
  .brand span, .help-button { display: none; }
  .hero { padding: 54px 20px 75px; min-height: auto; }
  h1 { font-size: 48px; }
  h2 { font-size: 34px; }
  .hero-lead { font-size: 15px; }
  .scope-switch { overflow-x: auto; }
  .scope-switch button { white-space: nowrap; }
  .search-line button { padding: 13px; font-size: 0; }
  .search-line button svg { width: 18px; }
  .hero-meta { display: none; }
  .onboarding { margin: 14px 14px 0; grid-template-columns: auto 1fr auto; }
  .onboarding > button:not(.onboarding-close) { grid-column: 2; }
  .onboarding-close { grid-column: 3; grid-row: 1; }
  .section { padding: 65px 20px; }
  .section-heading, .catalog-intro, .modal-heading, .records-heading { align-items: flex-start; flex-direction: column; display: flex; }
  .top-row { grid-template-columns: 28px 110px 1fr 65px; gap: 8px; }
  .top-row svg { display: none; }
  .source-tools { width: 100%; }
  .source-tools label { justify-content: space-between; }
  .catalog-stat { text-align: left; border-left: 0; border-top: 1px solid #5c564e; padding: 18px 0 0; }
  .catalog-filters { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .about-copy { grid-column: auto; }
  footer { grid-template-columns: 1fr; }
  .footer-institutions { grid-column: auto; }
  .footer-logo-row { max-width: 360px; }
  .source-modal { padding: 30px 18px; max-height: 100vh; border-radius: 0; }
  .modal-backdrop { padding: 0; }
  .modal-heading h2 { font-size: 32px; }
  .modal-kpis { grid-template-columns: 1fr 1fr; }
  .modal-kpis div:nth-child(2) { border-right: 0; }
  .analysis-tabs { overflow-x: auto; }
  .analysis-tabs button { white-space: nowrap; }
  .table-search { min-width: 100%; }
  .pagination { align-items: flex-start; gap: 12px; flex-direction: column; }
  .help-modal { min-height: 100vh; border-radius: 0; padding: 45px 25px; }
}

body{--font-geist-sans:Arial,sans-serif;--font-geist-mono:Consolas,monospace;--font-merriweather:Georgia,serif}


/* Informational tooltips are rendered at document-body level so table overflow cannot clip them. */
.info-tip::after { content: none !important; display: none !important; }
#ipbl-global-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2147483647;
  display: none;
  max-width: min(290px, calc(100vw - 24px));
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--ink, #262626);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
  font-family: var(--font-geist-sans, Arial, sans-serif);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: normal;
  text-transform: none;
  white-space: normal;
  pointer-events: none;
}
