:root {
  --blue: #a64b35;
  --blue-dark: #783628;
  --blue-deep: #34212f;
  --blue-pale: #f6e9e3;
  --ink: #2d2928;
  --muted: #69615e;
  --page: #f4f0eb;
  --white: #fff;
  --border: #d8cec6;
  --dark: #34212f;
  --green: #507467;
  --amber: #9a6a28;
  --shadow: 0 3px 14px rgba(50,30,25,.12);
  --sans: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--page); font-family: var(--sans); font-size: 16px; line-height: 1.55; }
a { color: var(--blue-dark); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 14px; color: #fff; background: var(--blue); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Identidade visual própria: arquivo editorial em ameixa, terracota e papel. */
.topbar { position: sticky; top: 0; z-index: 20; min-height: 82px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1180px)/2)); color: var(--blue-deep); background: #fffaf5; border-bottom: 3px solid var(--blue); box-shadow: 0 2px 10px rgba(52,33,47,.14); }
.brand { display: inline-flex; align-items: center; gap: 13px; color: inherit; text-decoration: none; }
.brand-symbol { width: 58px; height: 42px; display: grid !important; place-items: center; flex: 0 0 58px; color: var(--blue); background: transparent; border: 0; }
.brand-symbol svg { width: 52px; height: 42px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linejoin: round; }
.brand-symbol path + path { stroke: #8a6b3d; }
.brand > span:not(.brand-symbol), .footer-brand > span:not(.brand-symbol) { display: flex; flex-direction: column; line-height: 1.15; }
.brand strong { font-size: 17px; font-weight: 600; }
.brand > span > small { margin-top: 4px; color: #c9c9c9; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
nav { align-self: stretch; display: flex; }
nav a { min-width: 112px; display: grid; place-items: center; padding: 0 18px; color: #fff; border-left: 1px solid #444; font-size: 13px; font-weight: 600; text-decoration: none; }
nav a:last-child { border-right: 1px solid #444; }
nav a:hover, nav a:focus { background: #393939; }

.hero { color: #fff; background: linear-gradient(110deg, #294b77 0%, var(--blue) 58%, #6e8dbb 100%); border-bottom: 1px solid #294a73; }
.hero-grid { width: min(1180px, calc(100% - 48px)); min-height: 570px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, .55fr); gap: 70px; align-items: center; padding: 68px 0; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; color: #dbe7f6; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.eyebrow span { width: 22px; height: 3px; background: currentColor; }
h1, h2, h3 { font-family: var(--sans); }
h1 { max-width: 820px; margin: 0; font-size: clamp(43px, 5.2vw, 68px); font-weight: 400; letter-spacing: -.025em; line-height: 1.08; }
h1 em { color: #fff; font-style: normal; font-weight: 700; }
.lede { max-width: 760px; margin: 28px 0 0; color: #f1f5fa; font-size: 18px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 34px; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 15px; padding: 0 22px; border: 1px solid var(--blue-dark); border-radius: 2px; color: var(--blue-dark); background: #fff; font-size: 14px; font-weight: 700; text-decoration: none; transition: background .15s, box-shadow .15s; }
.button.primary { color: #fff; background: var(--blue); border-color: var(--blue-dark); }
.hero .button.primary { color: var(--blue-deep); background: #fff; border-color: #fff; }
.hero .button.quiet { color: #fff; background: rgba(0,0,0,.15); border-color: rgba(255,255,255,.65); }
.button:hover { box-shadow: 0 2px 7px rgba(0,0,0,.2); background: #f4f6f9; }
.button.primary:hover { color: #fff; background: var(--blue-dark); }
.hero .button.primary:hover { color: var(--blue-deep); background: #edf2f8; }
.hero-aside { padding: 25px 28px; background: rgba(20,44,74,.52); border: 1px solid rgba(255,255,255,.28); box-shadow: 0 3px 12px rgba(0,0,0,.14); }
.edition { display: flex; justify-content: space-between; padding-bottom: 13px; border-bottom: 1px solid rgba(255,255,255,.27); color: #dce7f4; font-size: 11px; text-transform: uppercase; }
.edition b { color: #fff; }
.stats { margin: 0; }
.stats div { padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,.22); }
.stats dt { font-size: 36px; font-weight: 300; line-height: 1; }
.stats dd { margin: 6px 0 0; color: #dce7f4; font-size: 11px; text-transform: uppercase; }
.hero-aside > p { margin: 20px 0 0; color: #dce7f4; font-size: 11px; text-transform: uppercase; }
.hero-aside > p strong { color: #fff; font-size: 12px; }

.catalog-section { padding: 72px 24px 95px; background: var(--page); }
.section-heading { width: min(1180px, 100%); margin: 0 auto 34px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: end; }
.catalog-section .eyebrow, .about-section .eyebrow { color: var(--blue-dark); }
.section-heading h2, .about-section h2 { margin: 0; font-size: clamp(34px, 4vw, 48px); font-weight: 400; letter-spacing: -.015em; line-height: 1.15; }
.section-heading > p { max-width: 500px; margin: 0; color: var(--muted); font-size: 15px; }
.search-panel { width: min(1180px, 100%); margin: 0 auto; padding: 18px; background: #fff; border: 1px solid var(--border); box-shadow: 0 1px 3px rgba(0,0,0,.09); }
.search-box { height: 56px; display: flex; align-items: center; gap: 14px; padding: 0 16px; background: #fff; border: 1px solid #aaa; }
.search-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(74,109,167,.2); }
.search-box svg { width: 21px; fill: none; stroke: var(--blue); stroke-width: 1.8; }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 17px; }
.search-box input::placeholder { color: #777; }
kbd { padding: 2px 8px; border: 1px solid #bbb; border-radius: 2px; color: #666; background: #eee; font-size: 11px; }
.filter-toggle { display: none; }
.filters { display: grid; grid-template-columns: .7fr 1.35fr 1.35fr .7fr auto; gap: 12px; align-items: end; margin-top: 17px; }
.filters label, .results-bar label { color: #555; font-size: 11px; font-weight: 700; }
select { width: 100%; margin-top: 6px; padding: 10px 32px 10px 10px; border: 1px solid #aaa; border-radius: 2px; color: var(--ink); background: #fff; font-size: 13px; outline: none; }
select:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(74,109,167,.15); }
.clear-button { height: 40px; padding: 0 14px; border: 1px solid var(--blue); border-radius: 2px; color: var(--blue-dark); background: #fff; font-size: 12px; font-weight: 700; }
.clear-button:hover { background: var(--blue-pale); }
.results-bar { width: min(1180px, 100%); margin: 25px auto 0; display: flex; align-items: center; justify-content: space-between; padding: 12px 15px; background: #e4e4e4; border: 1px solid #d0d0d0; }
.results-bar p { margin: 0; color: #555; font-size: 13px; }
.results-bar strong { color: var(--ink); font-size: 20px; }
.results-bar label { display: flex; align-items: center; gap: 9px; }
.results-bar select { width: auto; margin: 0; padding-top: 7px; padding-bottom: 7px; }
.timeline { width: min(1180px, 100%); margin: 18px auto 0; display: grid; gap: 18px; }
.timeline::before { display: none; }
.record-card { display: grid; grid-template-columns: 130px 1fr; background: #fff; border: 1px solid var(--border); border-left: 6px solid var(--blue); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.record-date { position: relative; display: flex; align-items: flex-start; justify-content: center; padding: 31px 14px; color: var(--blue-dark); background: var(--blue-pale); font-size: 18px; font-weight: 700; text-align: center; }
.record-date .year { display: block; word-break: normal; }
.record-date .dot { display: none; }
.record-body { margin: 0; padding: 27px 31px 29px; border: 0; }
.record-meta { display: flex; align-items: center; gap: 10px; }
.record-id { color: #666; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.strength { padding: 3px 8px; border-radius: 2px; color: #315b4c; background: #e1eee8; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.strength.medium { color: #735719; background: #f3ead3; }
.record-body h3 { max-width: 900px; margin: 10px 0 4px; color: #2f4f7e; font-size: clamp(22px, 2.3vw, 30px); font-weight: 400; line-height: 1.22; }
.category { margin: 0; color: #666; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.change-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 23px; border: 1px solid #ddd; }
.change-grid > div { padding: 18px 20px; background: #f7f7f7; }
.change-grid > div + div { padding-left: 20px; border-left: 1px solid #d3d3d3; background: #f0f4f9; }
.change-grid b { color: #555; font-size: 11px; }
.change-grid > div + div b { color: var(--blue-dark); }
.change-grid p { margin: 7px 0 0; color: #444; font-size: 14px; line-height: 1.6; }
.record-actions { display: flex; gap: 12px; align-items: center; margin-top: 20px; }
.details-button, .source-link { min-height: 36px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--blue); border-radius: 2px; color: var(--blue-dark); background: #fff; font-size: 12px; font-weight: 700; text-decoration: none; }
.details-button:hover, .source-link:hover { background: var(--blue-pale); }
.source-link { color: #fff; background: var(--blue); }
.source-link:hover { color: #fff; background: var(--blue-dark); }
.empty-state { width: min(1180px, 100%); margin: 55px auto 0; padding: 45px; text-align: center; background: #fff; border: 1px solid var(--border); }
.empty-state span { color: var(--blue); font-size: 45px; }
.empty-state h3 { margin: 8px 0; font-size: 27px; font-weight: 400; }
.empty-state p { color: #666; }

.method-section { padding: 75px 24px 88px; color: #fff; background: #3d3d3d; border-top: 6px solid var(--blue); }
.section-heading.light > p { color: #ddd; }
.method-section .eyebrow { color: #b8cce8; }
.method-grid { width: min(1180px, 100%); margin: 48px auto 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.method-grid article { min-height: 250px; padding: 24px; background: #fff; color: var(--ink); border-top: 5px solid var(--blue); box-shadow: var(--shadow); }
.method-grid article + article { border-left: 0; }
.method-grid b { color: var(--blue); font-size: 13px; }
.method-grid h3 { margin: 42px 0 12px; color: #2f4f7e; font-size: 21px; font-weight: 500; }
.method-grid p { margin: 0; color: #555; font-size: 14px; line-height: 1.65; }

.about-section { padding: 80px max(24px, calc((100vw - 1180px)/2)); display: grid; grid-template-columns: 1fr 1fr; gap: 90px; background: #fff; border-top: 1px solid #ddd; }
.about-section > div { max-width: 580px; }
.about-copy { padding-top: 20px; }
.about-copy p { margin: 0 0 18px; color: #555; font-size: 16px; line-height: 1.7; }
.about-copy a { display: inline-flex; align-items: center; gap: 10px; margin-top: 10px; padding: 11px 15px; border: 1px solid var(--blue); color: #fff; background: var(--blue); font-size: 13px; font-weight: 700; text-decoration: none; }
.about-copy a:hover { background: var(--blue-dark); }
footer { min-height: 145px; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 28px max(24px, calc((100vw - 1180px)/2)); color: #ddd; background: #222; border-top: 5px solid var(--blue); }
footer p { font-size: 11px; }
.footer-brand .brand-symbol { color: #d58a72; }
.footer-brand strong { color: #fff; }
.footer-brand > span > small { color: #bbb; }

dialog { width: min(760px, calc(100% - 32px)); max-height: 90vh; padding: 0; border: 1px solid #777; border-radius: 2px; color: var(--ink); background: #fff; box-shadow: 0 18px 70px rgba(0,0,0,.45); }
dialog::backdrop { background: rgba(0,0,0,.7); }
.dialog-close { position: sticky; z-index: 2; float: right; top: 14px; margin: 14px 14px 0 0; width: 38px; height: 38px; border: 1px solid #aaa; border-radius: 2px; color: #333; background: #fff; font-size: 24px; line-height: 1; }
.dialog-close:hover { background: #eee; }
.dialog-inner { padding: 50px clamp(24px, 6vw, 60px) 55px; border-top: 7px solid var(--blue); }
.dialog-inner .record-id { display: block; margin-bottom: 10px; }
.dialog-inner h2 { max-width: 590px; margin: 0 0 8px; color: #2f4f7e; font-size: clamp(29px, 5vw, 42px); font-weight: 400; line-height: 1.15; }
.dialog-inner .dialog-category { margin: 0 0 30px; color: #666; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.dialog-change { margin-top: 16px; padding: 20px; background: #f4f4f4; border-left: 5px solid #999; }
.dialog-change.after { background: #edf2f8; border-color: var(--blue); }
.dialog-change b { font-size: 11px; }
.dialog-change p { margin: 7px 0 0; line-height: 1.65; }
.dialog-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
.dialog-meta div { padding-top: 11px; border-top: 1px solid #ccc; }
.dialog-meta b { display: block; color: #666; font-size: 10px; text-transform: uppercase; }
.dialog-meta span { display: block; margin-top: 6px; font-size: 13px; }
.dialog-source { width: 100%; margin-top: 8px; }

@media (max-width: 900px) {
  .topbar { padding: 0 20px; }
  nav { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 35px; padding: 55px 0; }
  .hero-aside { display: grid; grid-template-columns: 1fr; }
  .stats { display: grid; grid-template-columns: repeat(3, 1fr); }
  .stats div { padding-right: 10px; }
  .section-heading, .about-section { grid-template-columns: 1fr; gap: 24px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .method-grid { grid-template-columns: 1fr 1fr; }
  .about-section { padding-left: 24px; padding-right: 24px; }
}

@media (max-width: 650px) {
  .topbar { min-height: 73px; border-bottom-width: 4px; }
  .brand-symbol { width: 48px; height: 40px; flex-basis: 48px; }
  .brand-symbol svg { width: 44px; height: 38px; }
  .brand strong { font-size: 15px; }
  .brand > span > small { font-size: 8px; }
  .hero-grid { width: calc(100% - 34px); min-height: auto; }
  h1 { font-size: 42px; }
  .lede { font-size: 16px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .stats dt { font-size: 28px; }
  .catalog-section, .method-section { padding: 60px 16px 70px; }
  .section-heading h2, .about-section h2 { font-size: 34px; }
  .search-panel { padding: 12px; }
  .filter-toggle { width: 100%; height: 42px; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; border: 1px solid var(--blue); border-radius: 2px; color: var(--blue-dark); background: #fff; font-size: 12px; font-weight: 700; }
  .filter-toggle span { padding: 1px 6px; border-radius: 10px; color: #fff; background: var(--blue); }
  .filters { display: none; grid-template-columns: 1fr; }
  .filters.open { display: grid; }
  .results-bar label { display: none; }
  .record-card { grid-template-columns: 1fr; border-left-width: 4px; }
  .record-date { justify-content: flex-start; padding: 11px 18px; font-size: 14px; }
  .record-body { padding: 22px 18px 24px; }
  .record-body h3 { font-size: 24px; }
  .change-grid { grid-template-columns: 1fr; }
  .change-grid > div + div { border-left: 0; border-top: 1px solid #d3d3d3; }
  .record-actions { align-items: stretch; flex-direction: column; }
  .details-button, .source-link { justify-content: center; }
  .method-grid { grid-template-columns: 1fr; }
  .method-grid article { min-height: auto; }
  .method-grid h3 { margin-top: 26px; }
  .about-section { padding: 60px 18px; }
  footer { align-items: flex-start; flex-direction: column; padding: 28px 20px; }
  .dialog-meta { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* Individual documentary record pages */
.details-button { text-decoration: none; }
.detail-page { background: #f2f2f2; }
.detail-article { width: min(100% - 40px, 980px); margin: 0 auto; padding: 42px 0 90px; }
.breadcrumb { display: inline-block; margin-bottom: 30px; color: var(--blue-dark); font-size: 13px; font-weight: 700; text-decoration: none; }
.breadcrumb:hover { text-decoration: underline; }
.detail-hero { padding: clamp(34px, 7vw, 72px); color: #fff; background: var(--blue-dark); border-top: 8px solid var(--blue-light); }
.detail-kicker { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.detail-kicker span, .detail-tags span { padding: 6px 9px; color: #fff; background: rgba(255,255,255,.14); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.detail-hero h1 { max-width: 820px; margin: 0; font-size: clamp(38px, 7vw, 68px); font-weight: 400; line-height: 1.05; }
.detail-hero > p { max-width: 760px; margin: 28px 0 0; color: #e4ebf4; font-size: 18px; line-height: 1.7; }
.detail-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 32px; }
.detail-section { padding: 70px clamp(0px, 4vw, 36px) 10px; }
.detail-section h2, .evidence-note h2 { margin: 12px 0 18px; color: #2f4f7e; font-size: clamp(30px, 5vw, 44px); font-weight: 400; }
.detail-section > p:not(.eyebrow) { max-width: 760px; color: #555; font-size: 17px; line-height: 1.75; }
.position-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin-top: 38px; background: #bbb; border: 1px solid #bbb; }
.position-card { min-height: 360px; padding: clamp(28px, 5vw, 52px); background: #fff; }
.position-card > b, .source-card b { color: #666; font-size: 10px; letter-spacing: .09em; }
.position-card h2 { margin: 22px 0 20px; color: #444; font-size: 28px; font-weight: 400; }
.position-card p { color: #444; font-size: 16px; line-height: 1.8; }
.after-card { background: #eaf0f7; }
.after-card h2 { color: var(--blue-dark); }
.source-section { padding-left: 0; padding-right: 0; }
.source-card { margin-top: 24px; padding: clamp(25px, 5vw, 48px); background: #fff; border-left: 6px solid #888; }
.source-card.change-source { border-color: var(--blue); }
.source-card > div:first-child { display: flex; gap: 18px; align-items: flex-start; }
.source-number { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; color: #fff; background: #666; font-size: 12px; font-weight: 700; }
.change-source .source-number { background: var(--blue); }
.source-card h3 { max-width: 650px; margin: 7px 0 0; color: #333; font-size: 20px; font-weight: 600; line-height: 1.4; }
.source-card blockquote { margin: 32px 0; padding: 24px 0 24px 24px; color: #333; border-left: 3px solid #ccc; font-family: Georgia, serif; font-size: 20px; font-style: italic; line-height: 1.65; }
.source-button { display: inline-flex; gap: 14px; align-items: center; padding: 12px 16px; color: #fff; background: var(--blue); font-size: 12px; font-weight: 700; text-decoration: none; }
.source-button:hover { background: var(--blue-dark); }
.source-unavailable { display: inline-block; padding: 12px 16px; color: #555; background: #eee; font-size: 12px; font-weight: 700; }
.chronology { margin: 36px 0 0; padding: 0; list-style: none; border-left: 3px solid var(--blue); }
.chronology li { position: relative; padding: 0 0 42px 38px; }
.chronology li::before { position: absolute; left: -9px; top: 1px; width: 15px; height: 15px; content: ''; background: #fff; border: 3px solid var(--blue); border-radius: 50%; }
.chronology li > b { color: var(--blue-dark); font-size: 18px; }
.chronology li p { max-width: 760px; margin: 10px 0; color: #444; font-size: 16px; line-height: 1.7; }
.chronology li small { color: #666; font-weight: 700; }
.chronology-source { display: inline-block; margin-left: 10px; color: var(--blue-dark); font-size: 12px; font-weight: 700; }
.evidence-note { margin-top: 55px; padding: clamp(28px, 6vw, 58px); background: #333; }
.evidence-note h2 { color: #fff; }
.evidence-note p { color: #ddd; font-size: 15px; line-height: 1.75; }
.detail-nav { padding: 34px 0; border-bottom: 1px solid #ccc; }
.detail-nav a { color: var(--blue-dark); font-size: 14px; font-weight: 700; text-decoration: none; }
@media (max-width: 700px) {
  .detail-article { width: min(100% - 24px, 980px); padding-top: 22px; }
  .detail-hero { margin: 0 -12px; }
  .position-grid { grid-template-columns: 1fr; }
  .position-card { min-height: auto; }
  .source-card blockquote { font-size: 18px; }
}

/* 2026 independent identity and legal notice */
h1, h2, h3 { font-family: var(--serif); }
.brand strong { color: var(--blue-deep); font-family: var(--serif); font-size: 19px; }
.brand > span > small { color: #756b66; }
.topbar nav a { min-width: 102px; color: var(--blue-deep); border-left: 1px solid #e0d5ce; }
.topbar nav a:last-child { border-right: 1px solid #e0d5ce; }
.topbar nav a:hover, .topbar nav a:focus { color: #fff; background: var(--blue-dark); }
.independence-notice { position: relative; z-index: 15; padding: 11px max(24px, calc((100vw - 1180px)/2)); color: #3f332f; background: #f4e8c8; border-bottom: 1px solid #dac791; font-size: 12px; line-height: 1.5; }
.independence-notice strong { color: #5d2f25; }
.independence-notice a { color: #5d2f25; font-weight: 700; }
.hero { background: radial-gradient(circle at 85% 15%, rgba(177,112,72,.46), transparent 32%), linear-gradient(125deg, #34212f 0%, #5b2d38 56%, #8e4938 100%); border-bottom-color: #281622; }
.hero .eyebrow, .hero-aside, .hero-aside p, .stats dd, .edition { color: #f5e8dc; }
.hero-aside { background: rgba(35,19,30,.5); border-radius: 18px 3px 18px 3px; }
.button, .search-box, select, .search-panel, .record-card, .method-grid article { border-radius: 6px; }
.record-body h3, .method-grid h3, .detail-section h2, .evidence-note h2 { color: var(--blue-dark); }
.method-section { background: #342f2c; }
footer { background: #241c21; border-top-color: #a64b35; }
footer .brand strong { color: #fffaf5; }
footer .brand-symbol { color: #d58a72; }
footer a { color: #f0c9b9; }
.detail-hero { background: linear-gradient(135deg, #34212f, #713645); border-top-color: #c48269; }
.after-card, .dialog-change.after { background: #f8ece6; }

.legal-main { width: min(920px, calc(100% - 40px)); margin: 0 auto; padding: 56px 0 90px; }
.blood-main { width: min(1180px, calc(100% - 40px)); }
.blood-intro { padding-top: 48px; }
.blood-topic-grid { grid-template-columns: repeat(3, 1fr); }
.blood-topic-grid .position-card { min-height: 300px; padding: 34px; }
.blood-topic-grid h3 { margin: 20px 0 16px; color: var(--blue-dark); font-family: Georgia, serif; font-size: 26px; font-weight: 400; }
.blood-chronology li { padding-bottom: 50px; }
@media (max-width: 900px) { .blood-topic-grid { grid-template-columns: 1fr; } }
.legal-hero { padding: clamp(32px, 6vw, 64px); color: #fff; background: linear-gradient(135deg, #34212f, #713645); border-radius: 20px 4px 20px 4px; }
.legal-hero h1 { margin: 0; font-size: clamp(38px, 7vw, 64px); }
.legal-hero p { max-width: 700px; margin: 20px 0 0; color: #f2ded5; font-size: 17px; }
.legal-section { margin-top: 28px; padding: clamp(24px, 5vw, 44px); background: #fff; border: 1px solid var(--border); border-radius: 14px 3px 14px 3px; }
.legal-section h2 { margin: 0 0 16px; color: var(--blue-dark); font-size: 30px; }
.legal-section p, .legal-section li { color: #504844; line-height: 1.75; }
.legal-section li + li { margin-top: 8px; }
.contact-form { display: grid; gap: 16px; margin-top: 22px; }
.contact-form label { display: grid; gap: 7px; color: #554a46; font-size: 13px; font-weight: 700; }
.contact-form input, .contact-form textarea { width: 100%; padding: 12px; border: 1px solid #ad9d94; border-radius: 5px; background: #fffdfb; }
.contact-form textarea { min-height: 150px; resize: vertical; }
.contact-form button { justify-self: start; padding: 12px 20px; border: 0; border-radius: 5px; color: #fff; background: var(--blue-dark); font-weight: 700; }
@media (max-width: 900px) { .independence-notice { padding-left: 20px; padding-right: 20px; } }
@media (max-width: 650px) { .brand-symbol { width: 48px; flex-basis: 48px; } .brand-symbol svg { width: 45px; } .independence-notice { font-size: 11px; } }

/* Interactive external studies library */
.studies-page { background: #ece7e1; }
.studies-hero { width: min(1180px, calc(100% - 48px)); margin: 48px auto 0; display: grid; grid-template-columns: 1fr 230px; gap: 40px; align-items: end; padding: clamp(38px, 7vw, 76px); color: #fff; background: radial-gradient(circle at 85% 10%, rgba(209,147,108,.38), transparent 30%), linear-gradient(125deg,#28202a,#5d3040); border-radius: 22px 4px 22px 4px; }
.studies-hero h1 { font-size: clamp(48px,7vw,78px); }
.studies-hero > div > p:last-child { max-width: 760px; margin: 25px 0 0; color: #f0ddd5; font-size: 18px; }
.studies-hero aside { display: flex; flex-direction: column; padding: 24px; color: #f3ddd3; background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.2); }
.studies-hero aside b { color: #fff; font-family: var(--serif); font-size: 54px; font-weight: 400; line-height: 1; }
.studies-hero aside span { margin-top: 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.studies-hero aside small { margin-top: 22px; padding-top: 13px; border-top: 1px solid rgba(255,255,255,.25); }
.studies-controls { width: min(1180px,calc(100% - 48px)); margin: 24px auto 0; display: grid; grid-template-columns: minmax(240px,1fr) auto auto; gap: 14px; padding: 16px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); }
.document-search { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 13px; border: 1px solid #ad9d94; }
.document-search svg { width: 20px; fill: none; stroke: var(--blue-dark); stroke-width: 1.8; }
.document-search input { width: 100%; border: 0; outline: 0; }
.study-filters, .view-switch { display: flex; flex-wrap: wrap; gap: 5px; }
.study-filters button, .view-switch button { padding: 9px 12px; border: 1px solid #c9bdb5; color: #5a4b45; background: #fff; font-size: 11px; font-weight: 700; }
.study-filters button.active, .view-switch button.active { color: #fff; background: var(--blue-dark); border-color: var(--blue-dark); }
.document-library { padding: 70px 24px 100px; }
.library-heading { width: min(1180px,100%); margin: 0 auto 34px; display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: end; }
.library-heading .eyebrow, .estimates-section .eyebrow, .criteria-section .eyebrow { color: var(--blue-dark); }
.library-heading h2 { margin: 0; font-size: clamp(34px,5vw,52px); font-weight: 400; }
.library-heading > p { margin: 0; color: #645b56; }
.document-grid { width: min(1180px,100%); margin: 0 auto; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.document-card { min-width: 0; display: flex; flex-direction: column; background: #fff; border: 1px solid #d2c7bf; box-shadow: 0 8px 28px rgba(58,37,31,.12); }
.document-tab { min-height: 42px; display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 9px 13px; color: #fff; background: #4c3d42; font-size: 10px; font-weight: 700; letter-spacing: .05em; }
.document-type { color: #f2c9b8; text-align: right; }
.paper-preview { position: relative; min-height: 455px; display: flex; flex-direction: column; align-items: stretch; padding: 29px 27px 24px; overflow: hidden; color: #171717; background: #fffef9; border: 0; text-align: left; box-shadow: inset 0 0 35px rgba(91,67,49,.06); }
.paper-preview::after { position: absolute; right: -55px; bottom: -55px; width: 120px; height: 120px; content: ''; background: linear-gradient(135deg,rgba(0,0,0,.06),#fffef9 55%); transform: rotate(45deg); }
.paper-masthead { font-family: var(--serif); font-size: 18px; font-weight: 700; text-align: center; }
.paper-rule { height: 4px; margin: 11px 0 22px; border-top: 1px solid #222; border-bottom: 1px solid #222; }
.paper-title { font-family: var(--serif); font-size: 22px; line-height: 1.13; }
.paper-author { margin-top: 12px; color: #555; font-family: var(--serif); font-size: 12px; }
.paper-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 12px; margin-top: 22px; }
.paper-columns i { height: 4px; background: #d5d0c8; }
.paper-columns i:nth-child(3n) { width: 78%; }
.paper-quote { margin: 23px -7px 0; padding: 12px 10px; color: #34212f; background: #f5df8d; font-family: var(--serif); font-size: 13px; line-height: 1.45; transform: rotate(-.5deg); }
.paper-page { margin-top: auto; padding-top: 25px; color: var(--blue-dark); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.paper-preview:hover .paper-page { text-decoration: underline; }
.document-caption { display: flex; flex: 1; flex-direction: column; padding: 20px; border-top: 1px solid #ddd4cd; }
.document-caption h3 { margin: 0; color: var(--blue-dark); font-size: 19px; line-height: 1.25; }
.document-caption p { margin: 10px 0 18px; color: #6a605b; font-size: 12px; }
.document-caption > div { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.examine-button, .original-link { min-height: 36px; display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid var(--blue-dark); color: var(--blue-dark); background: #fff; font-size: 11px; font-weight: 700; text-decoration: none; }
.examine-button:hover, .original-link:hover { color: #fff; background: var(--blue-dark); }
.document-grid.timeline-view { grid-template-columns: 1fr; gap: 15px; }
.timeline-view .document-card { display: grid; grid-template-columns: 220px 260px 1fr; }
.timeline-view .document-tab { min-height: 100%; flex-direction: column; justify-content: center; align-items: flex-start; padding: 24px; }
.timeline-view .paper-preview { min-height: 260px; }
.timeline-view .paper-columns { display: none; }
.timeline-view .paper-quote { max-height: 80px; overflow: hidden; }
.estimates-section { padding: 82px 24px; background: #fff; border-top: 1px solid #d8cec6; }
.estimate-grid { width: min(1180px,100%); margin: 35px auto 0; display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: #cfc4bc; border: 1px solid #cfc4bc; }
.estimate-grid article { min-height: 245px; padding: 34px; background: #fbf7f3; }
.estimate-grid b { color: var(--blue-dark); font-size: 10px; letter-spacing: .1em; }
.estimate-grid h3 { margin: 22px 0 12px; color: var(--blue-dark); font-size: 26px; font-weight: 400; }
.estimate-grid p { color: #5d5551; line-height: 1.7; }
.estimate-details { width: min(1180px,100%); margin: 18px auto 0; border: 1px solid #cfc4bc; background: #f8f1ec; }
.estimate-details summary { padding: 18px 22px; color: var(--blue-dark); font-weight: 700; cursor: pointer; }
.estimate-details > div { padding: 0 22px 22px; }
.criteria-section { width: min(1180px,calc(100% - 48px)); margin: 80px auto; display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; }
.criteria-section h2 { margin: 0; color: var(--blue-dark); font-size: 44px; font-weight: 400; }
.criteria-list p { display: grid; grid-template-columns: 45px 1fr; gap: 18px; margin: 0; padding: 20px 0; border-bottom: 1px solid #d2c8c1; }
.criteria-list p > b { color: var(--blue); font-family: var(--serif); font-size: 25px; }
.criteria-list span { color: #5d5551; }
.study-dialog { width: min(760px,calc(100% - 28px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: 18px 4px 18px 4px; box-shadow: 0 24px 80px rgba(0,0,0,.4); }
.study-dialog::backdrop { background: rgba(27,20,23,.75); }
.study-dialog-close { position: sticky; float: right; top: 14px; right: 14px; z-index: 2; width: 40px; height: 40px; border: 0; border-radius: 50%; color: #fff; background: var(--blue-dark); font-size: 24px; }
#study-dialog-content { padding: clamp(30px,7vw,65px); }
.dialog-document-meta { display: flex; flex-wrap: wrap; gap: 8px; padding-right: 40px; }
.dialog-document-meta span { padding: 5px 8px; color: #fff; background: var(--blue-dark); font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.dialog-journal { margin: 25px 0 8px; color: #766b65; font-family: var(--serif); }
#study-dialog-content h2 { margin: 0; color: var(--blue-dark); font-size: clamp(32px,6vw,52px); line-height: 1.08; }
.dialog-byline { margin: 20px 0 35px; padding-bottom: 22px; border-bottom: 3px double #a99c94; }
#study-dialog-content section { margin-top: 28px; }
#study-dialog-content section h3 { margin: 0 0 9px; color: var(--blue-dark); font-size: 22px; }
#study-dialog-content blockquote { margin: 30px 0; padding: 22px; background: #f6e5a5; border-left: 5px solid #bd8b2e; font-family: var(--serif); font-size: 18px; line-height: 1.6; }
.dialog-limit { padding: 22px; background: #f3e9e4; border-left: 5px solid var(--blue); }
#study-dialog-content dl { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 30px 0; background: #d8cec6; border: 1px solid #d8cec6; }
#study-dialog-content dl div { padding: 16px; background: #fff; }
#study-dialog-content dt { color: #756a64; font-size: 10px; font-weight: 700; text-transform: uppercase; }
#study-dialog-content dd { margin: 5px 0 0; overflow-wrap: anywhere; }
@media (max-width: 1050px) { .studies-controls { grid-template-columns: 1fr; } .document-grid { grid-template-columns: repeat(2,1fr); } .topbar nav a { min-width: 78px; padding-left: 10px; padding-right: 10px; } }
@media (max-width: 760px) { .studies-hero { grid-template-columns: 1fr; width: min(100% - 24px,1180px); margin-top: 18px; padding: 32px 24px; } .studies-hero aside { display: none; } .studies-controls { width: min(100% - 24px,1180px); } .study-filters { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; } .study-filters button { flex: 0 0 auto; } .view-switch { display: none; } .document-library { padding-left: 12px; padding-right: 12px; } .library-heading { grid-template-columns: 1fr; gap: 16px; } .document-grid { grid-template-columns: 1fr; } .paper-preview { min-height: 400px; } .estimate-grid { grid-template-columns: 1fr; } .criteria-section { grid-template-columns: 1fr; width: min(100% - 28px,1180px); gap: 30px; } #study-dialog-content dl { grid-template-columns: 1fr; } }
.studies-explainer { width: min(1180px,calc(100% - 48px)); margin: 24px auto 0; display: grid; grid-template-columns: .72fr 1.28fr; gap: 1px; background: #cfc4bc; border: 1px solid #cfc4bc; box-shadow: var(--shadow); }
.explainer-heading, .explainer-body { padding: clamp(30px,5vw,54px); background: #fff; }
.explainer-heading { background: #f6eee8; }
.explainer-heading .eyebrow { color: var(--blue-dark); }
.explainer-heading h2 { margin: 0; color: var(--blue-dark); font-size: clamp(36px,5vw,54px); font-weight: 400; line-height: 1.08; }
.explainer-heading > p:last-child { margin: 24px 0 0; color: #5e544f; font-size: 17px; line-height: 1.75; }
.explainer-lead { margin: 0 0 30px; color: #4f4642; font-size: 18px; line-height: 1.75; }
.explainer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: #d7cec8; border: 1px solid #d7cec8; }
.explainer-grid article { min-height: 225px; padding: 25px; background: #fffdfb; }
.explainer-grid span { color: var(--blue); font-family: var(--serif); font-size: 24px; }
.explainer-grid h3 { margin: 15px 0 10px; color: var(--blue-dark); font-size: 22px; font-weight: 400; }
.explainer-grid p { margin: 0; color: #625954; font-size: 14px; line-height: 1.65; }
.explainer-details { margin-top: 14px; border: 1px solid #d4c8c0; background: #fbf6f2; }
.explainer-details + .explainer-details { margin-top: 8px; }
.explainer-details summary { padding: 16px 18px; color: var(--blue-dark); font-weight: 700; cursor: pointer; }
.explainer-details > div { padding: 0 18px 17px; color: #5d5551; line-height: 1.7; }
.explainer-details p { margin: 0; }
.explainer-details p + p { margin-top: 10px; }
@media (max-width: 850px) { .studies-explainer { grid-template-columns: 1fr; width: min(100% - 24px,1180px); } }
@media (max-width: 570px) { .explainer-grid { grid-template-columns: 1fr; } .explainer-grid article { min-height: auto; } }
.origin-explainer { align-items: start; }
.origin-explainer .explainer-heading { position: sticky; top: 120px; }
.origin-timeline { margin: 0 0 30px; padding: 0; list-style: none; border-left: 3px solid var(--blue); }
.origin-timeline li { position: relative; display: grid; grid-template-columns: 105px 1fr; gap: 24px; padding: 0 0 42px 34px; }
.origin-timeline li::before { position: absolute; left: -9px; top: 4px; width: 15px; height: 15px; content: ''; background: #fff; border: 3px solid var(--blue); border-radius: 50%; }
.origin-timeline li > span { color: var(--blue-dark); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.origin-timeline h3 { margin: 0 0 11px; color: var(--blue-dark); font-size: 25px; font-weight: 400; line-height: 1.2; }
.origin-timeline p { margin: 0; color: #5b524d; font-size: 14px; line-height: 1.72; }
.origin-timeline p + p { margin-top: 11px; }
.origin-timeline a { display: inline-block; margin: 12px 12px 0 0; color: var(--blue-dark); font-size: 12px; font-weight: 700; }
@media (max-width: 850px) { .origin-explainer .explainer-heading { position: static; } }
@media (max-width: 520px) { .origin-timeline li { grid-template-columns: 1fr; gap: 8px; padding-left: 26px; } }
.paper-title-pt { margin-top: 9px; color: var(--blue-dark); font-family: var(--serif); font-size: 13px; font-style: italic; line-height: 1.4; }
.translated-title { margin: 9px 0 0; color: #5d3934; font-family: var(--serif); font-size: 16px; font-style: italic; font-weight: 400; line-height: 1.4; }
.translated-title::before { content: 'Em português: '; color: #8b7770; font-family: var(--sans); font-size: 9px; font-style: normal; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.dialog-title-translation { display: grid; gap: 5px; margin: 14px 0 0; padding: 14px 16px; color: #5d3934; background: #f5ebe6; border-left: 4px solid var(--blue); font-family: var(--serif); font-size: 20px; line-height: 1.4; }
.dialog-title-translation span { color: #826f68; font-family: var(--sans); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

/* Country dossier navigation */
.country-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;max-width:1180px;margin:1.5rem auto 2.5rem;padding:0 1.5rem;background:#d9cfd3;border:1px solid #d9cfd3}.detail-article>.country-tabs{margin-left:0;margin-right:0;padding:0;max-width:none}.country-tabs a{display:flex;flex-direction:column;gap:.28rem;padding:1rem 1.15rem;background:#fff;color:#34212f;text-decoration:none;transition:background .2s,color .2s}.country-tabs a:hover{background:#f5eff2}.country-tabs a.active{background:#34212f;color:#fff}.country-tabs span{font-size:.69rem;letter-spacing:.13em;font-weight:800}.country-tabs strong{font-size:.94rem;line-height:1.25}.country-intro{max-width:920px;margin:0 auto 3rem;padding:0 1.5rem;text-align:center}.country-intro p:last-child{max-width:760px;margin:0 auto;color:#6f626a}.country-hero{margin-bottom:0}.country-back{max-width:1120px;margin:2rem auto 4rem}.studies-page>.country-tabs+ .studies-explainer{margin-top:0}@media(max-width:640px){.country-tabs{grid-template-columns:1fr}.country-tabs a{padding:.85rem 1rem}}
