/* Radar CFP — layout enxuto, tons creme e bege */
:root {
  color-scheme: light;
  --bg: #f6f0e4;          /* creme */
  --paper: #fcf9f2;       /* papel */
  --tint: #efe6d4;        /* bege claro */
  --line: #e2d7c2;
  --line-2: #d3c5aa;
  --ink: #2e2820;
  --muted: #7a6e5c;
  --brand: #4e3d2a;
  --link: #6b4a24;
  --focus: #b06a2c;
  --soon: #a4481c;
  /* selos */
  --sel-capes: #3f6b23; --sel-capes-bg: #e2ecd3;
  --sel-ab: #23596f;    --sel-ab-bg: #dbe9ee;
  --sel-br: #6a5300;    --sel-br-bg: #f3e6ae;
  --sel-cont: #9a4a1c;  --sel-cont-bg: #f4dccb;
  --sel-sc: #6b3f7d;    --sel-sc-bg: #ecdff0;
  /* estratos */
  --g-MB: #2f5e22; --g-MB-bg: #dde9d2;
  --g-B: #2c4e74;  --g-B-bg: #dde5ee;
  --g-R: #7a5414;  --g-R-bg: #f1e2c2;
  --g-F: #5c5446;  --g-F-bg: #e7e0d2;
  --g-I: #7d7466;  --g-I-bg: #eee8dc;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--link); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
[hidden] { display: none !important; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--paper); padding: 6px 10px; z-index: 10; }
.muted { color: var(--muted); }

/* barra superior */
.top { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.bar { display: flex; align-items: center; gap: 18px; height: 44px; }
.brand { display: flex; align-items: center; gap: 7px; color: var(--brand); text-decoration: none; font-size: 15px; flex: none; }
.brand-mark { width: 22px; height: 22px; }
.brand .sep { color: var(--line-2); font-weight: 400; margin: 0 2px; }
.tabs { display: flex; gap: 2px; flex: 1; height: 100%; }
.tab { display: flex; align-items: center; padding: 0 10px; color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap; border-bottom: 2px solid transparent; }
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); }
.updated { color: var(--muted); font-size: 12px; white-space: nowrap; }
/* botao Mande pra gente (topo) */
.fale { flex: none; display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: 12.5px; font-weight: 700; height: 28px; padding: 0 11px 0 9px;
  border-radius: 999px; cursor: pointer; border: 1px solid var(--line-2); background: var(--bg); color: var(--link); white-space: nowrap; }
.fale:hover { border-color: var(--muted); background: #fffdf8; }
.fale svg { width: 16px; height: 16px; flex: none; }

/* janela flutuante (modal) */
.modal { width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--paper); color: var(--ink); box-shadow: 0 14px 44px rgba(70, 50, 20, .24); overflow: auto; }
.modal::backdrop { background: rgba(46, 40, 32, .38); }
.m-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px 9px 14px; border-bottom: 1px solid var(--line); background: var(--tint); }
.m-head h2 { font-size: 15px; color: var(--brand); }
.m-x { font: inherit; font-size: 20px; line-height: 1; width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.m-x:hover { background: var(--line); color: var(--ink); }
.m-body { display: grid; gap: 9px; padding: 11px 14px 14px; margin: 0; }
.m-body p { margin: 0; }
.m-intro { font-size: 13px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; border: 0; padding: 0; margin: 0; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 700; color: var(--muted); }
.seg label:hover span { border-color: var(--muted); }
.seg input:checked + span { color: var(--sel-ab); background: var(--sel-ab-bg); border-color: transparent; }
.seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.fld { display: grid; gap: 3px; font-size: 12px; font-weight: 700; color: var(--muted); }
.fld i { font-weight: 400; }
.fld input, .fld textarea { font: inherit; font-size: 13.5px; font-weight: 400; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; width: 100%; }
.fld textarea { resize: vertical; min-height: 76px; }
.fld input:focus, .fld textarea:focus { border-color: var(--line-2); background: #fffdf8; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.m-note { font-size: 11.5px; color: var(--muted); }
.m-err { font-size: 12.5px; color: var(--soon); font-weight: 600; }
.m-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 2px; }
.btn { font: inherit; font-size: 13px; font-weight: 700; height: 30px; padding: 0 14px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); }
.btn:hover { border-color: var(--muted); }
.btn-pri { background: var(--brand); border-color: var(--brand); color: #fffaf0; }
.btn-pri:hover { background: #3d2f20; }
.btn:disabled { opacity: .6; cursor: progress; }
.m-ok p { font-size: 13.5px; }

main { padding-top: 10px; padding-bottom: 24px; outline: none; }
h1 { font-size: 18px; margin: 0; }
h2 { font-size: 14px; margin: 0; }

/* filtros */
.filters { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; margin-bottom: 8px; display: grid; gap: 6px; position: sticky; top: 44px; z-index: 4; }
.frow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.filters input[type=search], .filters select {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; height: 28px;
}
.filters input[type=search] { flex: 1 1 220px; min-width: 0; }
.filters select { flex: 0 1 auto; max-width: 100%; }
.flabel { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.chips { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-right: 6px; }
.chip { font: inherit; font-size: 12px; font-weight: 700; height: 22px; padding: 0 9px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line-2); background: transparent; color: var(--muted); }
.chip:hover { border-color: var(--muted); }
.chip[aria-pressed="false"] { background: transparent; color: var(--muted); }
.chip[aria-pressed="true"] { border-color: transparent; }
.chip.g-MB[aria-pressed="true"] { color: var(--g-MB); background: var(--g-MB-bg); }
.chip.g-B[aria-pressed="true"] { color: var(--g-B); background: var(--g-B-bg); }
.chip.g-R[aria-pressed="true"] { color: var(--g-R); background: var(--g-R-bg); }
.chip.g-F[aria-pressed="true"] { color: var(--g-F); background: var(--g-F-bg); }
.chip.g-I[aria-pressed="true"] { color: var(--g-I); background: var(--g-I-bg); }
.chip.sel-capes[aria-pressed="true"] { color: var(--sel-capes); background: var(--sel-capes-bg); }
.chip.sel-ab[aria-pressed="true"] { color: var(--sel-ab); background: var(--sel-ab-bg); }
.chip.sel-br[aria-pressed="true"] { color: var(--sel-br); background: var(--sel-br-bg); }
.chip.sel-cont[aria-pressed="true"] { color: var(--sel-cont); background: var(--sel-cont-bg); }
.chip.sel-sc[aria-pressed="true"] { color: var(--sel-sc); background: var(--sel-sc-bg); }
.count { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

/* selos e etiquetas */
.sel, .g { display: inline-block; font-size: 10.5px; font-weight: 700; line-height: 16px; padding: 0 6px; border-radius: 4px; letter-spacing: .02em; white-space: nowrap; }
.sel-capes { color: var(--sel-capes); background: var(--sel-capes-bg); }
.sel-ab { color: var(--sel-ab); background: var(--sel-ab-bg); }
.sel-br { color: var(--sel-br); background: var(--sel-br-bg); }
.sel-cont { color: var(--sel-cont); background: var(--sel-cont-bg); }
.sel-sc { color: var(--sel-sc); background: var(--sel-sc-bg); }
/* +1: o bonus da SciELO mudou o estrato */
.bn { font-size: 9px; font-weight: 800; color: var(--sel-sc); vertical-align: super; line-height: 0; margin-left: 1px; cursor: help; }
.c-g { flex: none; white-space: nowrap; }
.g { border-radius: 999px; }
.g-MB { color: var(--g-MB); background: var(--g-MB-bg); }
.g-B { color: var(--g-B); background: var(--g-B-bg); }
.g-R { color: var(--g-R); background: var(--g-R-bg); }
.g-F { color: var(--g-F); background: var(--g-F-bg); }
.g-I { color: var(--g-I); background: var(--g-I-bg); }

/* cards em colunas */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px 8px; display: flex; flex-direction: column; gap: 4px; min-height: 128px; cursor: default; }
.card:hover, .card.tip-on { border-color: var(--line-2); background: #fffdf8; }
.card.cont { border-top: 3px solid var(--sel-cont); padding-top: 5px; }
.card.closed { opacity: .72; }
.c-top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; font-variant-numeric: tabular-nums; }
.c-date { font-weight: 700; font-size: 12.5px; }
.c-left { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.c-left.soon { color: var(--soon); font-weight: 700; }
.c-sel { display: flex; flex-wrap: wrap; gap: 3px; min-height: 16px; }
.c-ti { font-weight: 600; font-size: 13px; line-height: 1.3; color: var(--ink); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.c-ti:hover { color: var(--link); text-decoration: underline; }
.c-jn { margin-top: auto; display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); min-width: 0; }
.c-jn span:first-child, .c-jn .c-jl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.c-jn .c-jl { color: var(--muted); text-decoration: none; }
.c-jn .c-jl:hover { color: var(--link); text-decoration: underline; }
.glink { text-decoration: none; }
.glink:hover .g { outline: 1px solid currentColor; }
.empty { grid-column: 1 / -1; padding: 12px; color: var(--muted); }
.sentinel { height: 1px; }

/* dica ao passar o mouse */
.tip { position: fixed; z-index: 20; width: 360px; max-width: calc(100vw - 16px); background: #fffdf7; color: var(--ink); border: 1px solid var(--line-2);
  border-radius: 8px; padding: 9px 11px; box-shadow: 0 6px 22px rgba(70, 50, 20, .16); font-size: 13px; line-height: 1.45; pointer-events: none; }
.tip .t-ti { font-weight: 700; margin-bottom: 3px; }
.tip .t-meta { color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.tip p { margin: 0 0 5px; }
.tip .t-tm { color: var(--muted); font-size: 12px; }
.tip .none { color: var(--muted); font-style: italic; }

/* tabela */
.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { text-align: left; padding: 4px 8px; border-top: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
.tbl thead th { border-top: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--tint); }
.tbl td:first-child { white-space: normal; min-width: 240px; }
.tbl .pt { color: var(--ink); text-decoration: none; font-weight: 600; }
.tbl .pt:hover { text-decoration: underline; }
.tbl .issn { color: var(--muted); font-size: 11px; margin-left: 4px; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .area { color: var(--muted); }
.tbl .area.CONT { color: var(--sel-cont); font-weight: 600; }
.tbl td .sel { margin-right: 2px; }
.linkbtn { font: inherit; font-weight: 700; background: none; border: 0; color: var(--link); text-decoration: underline; cursor: pointer; padding: 0; }

/* sobre */
.prose { max-width: 760px; }
.prose h1 { margin-bottom: 6px; }
.prose h2 { margin: 16px 0 4px; font-size: 14px; scroll-margin-top: 64px; }
.prose h3 { margin: 8px 0 2px; font-size: 13px; }
.prose h3 .muted { font-weight: 400; font-size: 12px; margin-left: 4px; }
.ver ul { margin: 2px 0 6px; padding-left: 18px; }
.ver li { margin: 2px 0; }
.cite { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px 7px; margin: 6px 0; }
.cite-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cite-t { margin: 3px 0 0; font-size: 13px; overflow-wrap: anywhere; }
pre.cite-t { white-space: pre-wrap; font: 12px/1.45 ui-monospace, Consolas, "Courier New", monospace; }
.copy { font: inherit; font-size: 11px; font-weight: 700; text-transform: none; letter-spacing: 0; height: 22px; padding: 0 10px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line-2); background: var(--bg); color: var(--link); }
.copy:hover { border-color: var(--muted); }
.foot .ver-link { color: var(--link); }
.prose p { margin: 4px 0; }
.legend { display: grid; grid-template-columns: max-content 1fr; gap: 4px 10px; margin: 6px 0; }
.legend dd { margin: 0; }
.foot { color: var(--muted); font-size: 12px; padding: 10px 16px 24px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; border-top: 1px solid var(--line); margin-top: 8px; }
.foot .author { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.foot .li { display: inline-flex; align-items: center; gap: 5px; color: var(--link); text-decoration: none; }
.foot .li:hover span { text-decoration: underline; }
.foot .li svg { width: 16px; height: 16px; flex: none; }

@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* topo apertado: o botao fica so com o icone */
@media (max-width: 960px) { .fale span { display: none; } .fale { padding: 0 6px; } }
@media (max-width: 880px) { .updated { display: none; } }
@media (max-width: 820px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .card { min-height: 0; }
  .bar { gap: 10px; }
  .brand b, .updated { display: none; }
  .filters { position: static; }
  .count { margin-left: 0; width: 100%; }
}
