/* ============================================================
   SEADIP · Práticas Educacionais Abertas — identidade SEADIP/UFPR
   Vinho #651223 + Azul #00558f · Open Sans · motivo das colunas.
   ============================================================ */
@font-face { font-family: "Open Sans"; font-weight: 300; font-style: normal; font-display: swap; src: url("fonts/OpenSans-Light.ttf") format("truetype"); }
@font-face { font-family: "Open Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/OpenSans-Regular.ttf") format("truetype"); }
@font-face { font-family: "Open Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/OpenSans-Medium.ttf") format("truetype"); }
@font-face { font-family: "Open Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/OpenSans-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Open Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/OpenSans-Bold.ttf") format("truetype"); }
@font-face { font-family: "Open Sans"; font-weight: 800; font-style: normal; font-display: swap; src: url("fonts/OpenSans-ExtraBold.ttf") format("truetype"); }

:root {
  --vinho: #651223; --vinho-strong: #4c0d1a; --vinho-soft: #f2e3e6;
  --azul: #00558f; --azul-strong: #003e6b; --azul-soft: #e1ecf4;

  --paper: #f6f4f1;
  --surface: #ffffff;
  --surface-2: #efebe5;
  --ink: #1b1920;
  --ink-soft: #54525b;
  --ink-faint: #8a8891;
  --rule: #e7e2db;
  --rule-strong: #d6cfc4;
  --brand: var(--vinho);
  --brand-strong: var(--vinho-strong);
  --brand-soft: var(--vinho-soft);
  --accent: var(--azul);
  --accent-soft: var(--azul-soft);
  --reuse: var(--azul);
  --reuse-soft: var(--azul-soft);
  --danger: #b23a2e;
  --focus: #00558f;

  --serif: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Open Sans", system-ui, "Segoe UI", sans-serif;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20,22,26,.04), 0 12px 30px -16px rgba(20,22,26,.26);
  --maxw: 1140px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #17141a; --surface: #201c24; --surface-2: #2a252e;
    --ink: #f0ecef; --ink-soft: #c2bcc4; --ink-faint: #8f8893;
    --rule: #332d36; --rule-strong: #443c47;
    --brand: #e08597; --brand-strong: #efb0bd; --brand-soft: #3a1a22;
    --azul: #5fb0e6; --accent: #5fb0e6; --accent-soft: #16304a;
    --reuse: #5fb0e6; --reuse-soft: #16304a; --danger: #e8837a; --focus: #5fb0e6;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 14px 34px -18px rgba(0,0,0,.7);
  }
}
:root[data-theme="dark"] {
  --paper: #17141a; --surface: #201c24; --surface-2: #2a252e;
  --ink: #f0ecef; --ink-soft: #c2bcc4; --ink-faint: #8f8893;
  --rule: #332d36; --rule-strong: #443c47;
  --brand: #e08597; --brand-strong: #efb0bd; --brand-soft: #3a1a22;
  --azul: #5fb0e6; --accent: #5fb0e6; --accent-soft: #16304a;
  --reuse: #5fb0e6; --reuse-soft: #16304a; --danger: #e8837a; --focus: #5fb0e6;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 14px 34px -18px rgba(0,0,0,.7);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition-duration: .001ms !important; animation-duration: .001ms !important; } }
body { font-family: var(--sans); color: var(--ink); background: var(--paper); line-height: 1.55; -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 8px; transition: top .15s; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
svg { display: block; }

/* -------------------- Topbar -------------------- */
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 18px; padding: 12px clamp(16px, 4vw, 40px); background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.3) blur(8px); border-bottom: 1px solid var(--rule); }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark svg { fill: none; }
.brand-mark circle { fill: var(--brand); }
.brand-mark line { stroke: var(--brand-strong); stroke-width: 2; }
.brand-text { font-family: var(--serif); font-weight: 600; font-size: 21px; letter-spacing: -.01em; line-height: 1; }
.brand-text small { display: block; font-family: var(--mono); font-size: 10px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin-top: 3px; }
.topbar-search { flex: 1; max-width: 420px; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 999px; padding: 8px 14px; color: var(--ink-faint); }
.topbar-search:focus-within { border-color: var(--brand); }
.ic-search { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; flex-shrink: 0; }
.topbar-search input { flex: 1; border: 0; background: none; outline: none; font: inherit; font-size: 14px; color: var(--ink); min-width: 0; }
.topbar-search input::placeholder { color: var(--ink-faint); }
.topbar-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.btn-link { font-size: 14px; font-weight: 600; color: var(--ink-soft); padding: 8px 12px; border-radius: 8px; }
.btn-link:hover { color: var(--accent); }
.brand img { height: 38px; width: auto; display: block; }
.btn-icon { background: none; border: 1px solid var(--rule-strong); border-radius: 8px; color: var(--ink-soft); cursor: pointer; width: 36px; height: 36px; font-size: 15px; }
.btn-icon:hover { color: var(--ink); }
.t-escuro { display: none; } :root[data-theme="dark"] .t-claro { display: none; } :root[data-theme="dark"] .t-escuro { display: inline; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .t-claro { display: none; } :root:not([data-theme="light"]) .t-escuro { display: inline; } }

main { flex: 1; width: 100%; }

/* botões gerais */
.btn { font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; border-radius: 999px; border: 1px solid transparent; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; transition: transform .1s, background .15s, border-color .15s; }
.btn-primary { background: var(--brand); color: #fff; padding: 11px 20px; }
.btn-primary:hover { background: var(--brand-strong); } .btn-primary:active { transform: translateY(1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--rule-strong); padding: 10px 18px; }
.btn-ghost:hover { border-color: var(--ink-faint); }
.btn-ghost:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* -------------------- Hero (descoberta) -------------------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--rule); background: linear-gradient(180deg, color-mix(in srgb, var(--brand-soft) 45%, var(--paper)), var(--paper)); }
.hero-bars { position: absolute; top: 0; right: clamp(-30px, 1vw, 30px); bottom: 0; width: 40%; max-width: 440px; opacity: .13; pointer-events: none; display: flex; align-items: center; z-index: 0; }
.hero-bars svg { width: 100%; height: 74%; }
.hero-in { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: clamp(34px, 6vw, 60px) clamp(16px, 4vw, 40px) clamp(26px, 3vw, 36px); }
.hero-eyebrow { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.hero h1 { font-family: var(--serif); font-weight: 800; font-size: clamp(30px, 5vw, 50px); line-height: 1.04; letter-spacing: -.02em; max-width: 16ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
@media (max-width: 760px) { .hero-bars { display: none; } }
.hero-lede { margin-top: 14px; max-width: 54ch; font-size: clamp(15px, 1.8vw, 18px); color: var(--ink-soft); }
.hero-search { margin-top: 26px; max-width: 640px; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1.5px solid var(--rule-strong); border-radius: 999px; padding: 6px 6px 6px 18px; box-shadow: var(--shadow); }
.hero-search:focus-within { border-color: var(--brand); }
.hero-search .ic-search { width: 20px; height: 20px; color: var(--ink-faint); }
.hero-search input { flex: 1; border: 0; background: none; outline: none; font: inherit; font-size: 16px; color: var(--ink); min-width: 0; }
.hero-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; align-items: center; }
.hero-quick .ql { font-size: 12.5px; color: var(--ink-faint); margin-right: 2px; }
.qchip { font-size: 13px; font-weight: 500; color: var(--ink-soft); background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 999px; padding: 6px 13px; cursor: pointer; }
.qchip:hover { border-color: var(--brand); color: var(--brand); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--rule); }
.hero-stat b { display: block; font-family: var(--serif); font-size: 26px; font-weight: 600; }
.hero-stat span { font-size: 12.5px; color: var(--ink-faint); }

/* -------------------- Layout feed -------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: clamp(22px, 3vw, 34px) clamp(16px, 4vw, 40px) 64px; display: grid; grid-template-columns: 240px 1fr; gap: clamp(22px, 3vw, 40px); align-items: start; }
.facets { position: sticky; top: 78px; display: flex; flex-direction: column; gap: 24px; }
.facet h3 { font-family: var(--mono); font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 11px; font-weight: 600; }
.facet-list { display: flex; flex-direction: column; gap: 2px; }
.facet-btn { font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; background: none; border: 0; color: var(--ink-soft); padding: 6px 10px; border-radius: 8px; display: flex; align-items: center; gap: 9px; width: 100%; }
.facet-btn:hover { background: var(--surface-2); color: var(--ink); }
.facet-btn[aria-pressed="true"] { background: var(--brand); color: #fff; font-weight: 600; }
.facet-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; background: var(--brand); }
.facet-count { margin-left: auto; font-family: var(--mono); font-size: 11px; opacity: .6; }
.facet-reset { font: inherit; font-size: 13px; background: none; border: 0; cursor: pointer; color: var(--brand); text-decoration: underline; text-align: left; padding: 2px 0; }

.feed-main { min-width: 0; }
.feed-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.feed-count { font-size: 14px; color: var(--ink-soft); } .feed-count b { color: var(--ink); }
.feed-sort { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-faint); }
select { font: inherit; font-size: 13px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink); cursor: pointer; }
.chips-ativos { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip-ativo { font-size: 12px; font-weight: 600; background: var(--surface); border: 1px solid var(--rule-strong); color: var(--ink-soft); padding: 4px 8px 4px 11px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.chip-ativo button { background: none; border: 0; cursor: pointer; color: var(--ink-faint); font-size: 15px; line-height: 1; } .chip-ativo button:hover { color: var(--danger); }

/* -------------------- Card -------------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; transition: transform .14s, box-shadow .18s, border-color .18s; }
.card:hover, .card:focus-within { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--rule-strong); }
.card-head { padding: 16px 18px 0; display: flex; align-items: center; gap: 8px; }
.area-tag { font-size: 11.5px; font-weight: 600; color: var(--azul); background: var(--azul-soft); padding: 3px 10px 3px 8px; border-radius: 6px; display: inline-flex; align-items: center; gap: 6px; }
.area-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--area, var(--azul)); flex-shrink: 0; }
.card-nivel { font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint); margin-left: auto; text-align: right; }
.card-body { padding: 12px 18px 14px; flex: 1; }
.card h3 { font-family: var(--serif); font-weight: 600; font-size: 20px; line-height: 1.22; letter-spacing: -.01em; margin-bottom: 7px; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card-resumo { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
.card-para { margin-top: 12px; font-family: var(--mono); font-size: 11px; color: var(--ink-faint); display: flex; align-items: center; gap: 6px; }
.card-foot { border-top: 1px solid var(--rule); padding: 11px 18px; display: flex; align-items: center; gap: 10px; }
.card-foot .lic-chip { position: relative; z-index: 1; }
.card-rs { margin-left: 0; }
.card-metrics { margin-left: auto; display: flex; gap: 12px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); flex-shrink: 0; }
.card-metrics b { color: var(--brand); }

/* Licença + 5R */
.lic-chip { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink-soft); white-space: nowrap; }
.lic-chip .cc { color: var(--brand); } .lic-cond { font-size: 9.5px; font-weight: 700; padding: 1px 4px; border-radius: 3px; background: var(--brand-soft); color: var(--brand); }
.lic-cond.nc, .lic-cond.nd { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.rs-mini { display: inline-flex; gap: 3px; }
.rs-g { width: 19px; height: 19px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 8.5px; font-weight: 700; letter-spacing: -.03em; }
.rs-g.on { background: var(--brand-soft); color: var(--brand); } .rs-g.off { color: var(--ink-faint); border: 1px dashed var(--rule-strong); opacity: .55; }

.vazio { grid-column: 1/-1; text-align: center; padding: 56px 20px; border: 1px dashed var(--rule-strong); border-radius: var(--radius); color: var(--ink-soft); }
.vazio b { display: block; font-family: var(--serif); font-size: 22px; color: var(--ink); margin-bottom: 8px; }

/* -------------------- Detalhe (kit de reúso) -------------------- */
.detalhe { max-width: 1000px; margin: 0 auto; padding: clamp(22px, 3vw, 40px) clamp(16px, 4vw, 40px) 72px; }
.voltar { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--ink-soft); margin-bottom: 24px; } .voltar:hover { color: var(--accent); }
.det-grid { display: grid; grid-template-columns: 1fr 320px; gap: clamp(24px, 3vw, 44px); align-items: start; }
.det-head-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.detalhe h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(28px, 4vw, 42px); line-height: 1.08; letter-spacing: -.015em; }
.det-resumo { margin-top: 14px; font-family: var(--serif); font-size: 19px; line-height: 1.5; color: var(--ink-soft); }
.det-autor { margin-top: 18px; display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--ink-soft); }
.det-autor .av { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 600; font-size: 17px; flex-shrink: 0; }
.det-autor b { color: var(--ink); }

.secao { margin-top: 34px; }
.secao > h2 { font-family: var(--mono); font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 15px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.secao > h2::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.lista-obj { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.lista-obj li { display: flex; gap: 12px; font-size: 16px; line-height: 1.5; }
.lista-obj li::before { content: ""; flex-shrink: 0; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.passos p { font-family: var(--serif); font-size: 17.5px; line-height: 1.7; margin-bottom: 18px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { font-size: 12.5px; background: var(--surface); border: 1px solid var(--rule-strong); padding: 6px 12px; border-radius: 999px; color: var(--ink-soft); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; } .tag { font-family: var(--mono); font-size: 12px; color: var(--brand); } .tag::before { content: "#"; opacity: .5; }

/* REA (recursos para baixar/usar) */
.rea-list { display: flex; flex-direction: column; gap: 10px; }
.rea { display: flex; align-items: center; gap: 13px; border: 1px solid var(--rule); border-radius: 11px; padding: 13px 15px; background: var(--surface); transition: border-color .15s, transform .1s; }
.rea:hover { border-color: var(--brand); transform: translateX(2px); }
.rea-tipo { font-family: var(--mono); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #fff; background: var(--brand); padding: 4px 8px; border-radius: 6px; flex-shrink: 0; }
.rea-nome { flex: 1; font-size: 14.5px; color: var(--ink); font-weight: 500; }
.rea-link { font-size: 13px; color: var(--accent); font-weight: 600; white-space: nowrap; }

/* Linhagem */
.linhagem { border: 1px solid var(--rule); border-left: 3px solid var(--brand); border-radius: 11px; padding: 15px 17px; background: var(--surface); }
.linhagem a { display: flex; align-items: center; gap: 10px; padding: 6px 0; color: var(--ink); font-size: 14.5px; } .linhagem a:hover { color: var(--brand); }
.lin-seta { font-family: var(--mono); font-size: 11px; color: var(--brand); flex-shrink: 0; }
.lin-tipo { font-family: var(--mono); font-size: 10px; text-transform: uppercase; background: var(--brand-soft); color: var(--brand); padding: 1px 6px; border-radius: 4px; flex-shrink: 0; }

/* -------- Sidebar de reúso (sticky) -------- */
.reuse-aside { position: sticky; top: 78px; display: flex; flex-direction: column; gap: 16px; }
.panel { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); padding: 18px; }
.panel-title { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; margin-bottom: 14px; }
.panel .lic-big { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.panel .lic-big .sigla { font-family: var(--mono); font-weight: 600; font-size: 16px; color: var(--ink); }
.panel .lic-nome { font-size: 12.5px; color: var(--ink-faint); margin-bottom: 14px; }
/* 5R lista (o que você pode fazer) */
.rs-list { display: flex; flex-direction: column; gap: 9px; }
.rs-item { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.rs-ic { width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.rs-item.ok .rs-ic { background: var(--brand-soft); color: var(--brand); } .rs-item.ok b { color: var(--ink); }
.rs-item.no .rs-ic { background: color-mix(in srgb, var(--danger) 13%, transparent); color: var(--danger); } .rs-item.no { color: var(--ink-faint); }
.rs-item small { display: block; color: var(--ink-faint); font-size: 11.5px; }
.panel-acoes { display: flex; flex-direction: column; gap: 9px; margin-top: 16px; }
.panel-acoes .btn { justify-content: center; width: 100%; }
.reuse-count { text-align: center; font-size: 12.5px; color: var(--ink-faint); margin-top: 10px; font-family: var(--mono); }
.reuse-count b { color: var(--brand); }
/* Como creditar */
.cite-box { font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--ink-soft); background: var(--surface-2); border: 1px solid var(--rule); border-radius: 9px; padding: 12px; margin-top: 8px; }
.btn-copy { font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; background: none; border: 1px solid var(--rule-strong); color: var(--ink-soft); padding: 7px 12px; border-radius: 8px; margin-top: 10px; width: 100%; }
.btn-copy:hover { border-color: var(--brand); color: var(--brand); }
.meta-list { display: flex; flex-direction: column; gap: 10px; font-family: var(--mono); font-size: 12px; }
.meta-list div span { display: block; color: var(--ink-faint); margin-bottom: 2px; } .meta-list div b { color: var(--ink); font-weight: 500; font-size: 12.5px; }

/* -------------------- Sobre -------------------- */
.sobre { max-width: 780px; margin: 0 auto; padding: clamp(24px,4vw,44px) clamp(16px,4vw,40px) 72px; }
.sobre h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(28px,4vw,40px); letter-spacing: -.015em; margin-bottom: 10px; }
.sobre p { color: var(--ink-soft); font-size: 16px; line-height: 1.65; margin-bottom: 14px; }
.sobre h2 { font-family: var(--serif); font-size: 22px; margin: 28px 0 10px; }
.sobre .rs-list { margin-top: 10px; }

/* -------------------- Toast -------------------- */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow); z-index: 100; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* -------------------- Rodapé -------------------- */
.rodape { border-top: 1px solid var(--rule); padding: 32px clamp(16px,4vw,40px); text-align: center; color: var(--ink-soft); font-size: 14px; }
.rodape p { max-width: 64ch; margin: 0 auto; } .rodape-nota { margin-top: 8px; font-size: 12.5px; color: var(--ink-faint); } .rodape strong { color: var(--ink); }

/* -------------------- Responsivo -------------------- */
@media (max-width: 940px) {
  .wrap { grid-template-columns: 1fr; }
  .facets { position: static; flex-direction: row; flex-wrap: wrap; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
  .facet { flex: 1; min-width: 170px; } .facet-list { flex-direction: row; flex-wrap: wrap; } .facet-btn { width: auto; } .facet-count { display: none; }
  .det-grid { grid-template-columns: 1fr; } .reuse-aside { position: static; }
}
@media (max-width: 560px) {
  .topbar-search { display: none; }
  .hero-stats { gap: 18px; } .hero-stat b { font-size: 22px; }
}

/* ============================================================
   Árvore de contribuições (rede de adaptações)
   ============================================================ */
.rede { max-width: var(--maxw); margin: 0 auto; padding: clamp(22px,3vw,40px) clamp(16px,4vw,40px) 72px; }
.rede-head h1 { font-family: var(--serif); font-weight: 800; font-size: clamp(26px,4vw,40px); letter-spacing: -.015em; }
.rede-head p { color: var(--ink-soft); margin-top: 8px; max-width: 62ch; }
.rede-legenda { display: flex; flex-wrap: wrap; gap: 14px; margin: 16px 0 6px; }
.rede-leg { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-soft); }
.rede-leg .dot { width: 11px; height: 11px; border-radius: 50%; }
.rede-canvas { margin-top: 16px; border: 1px solid var(--rule); border-radius: 16px; background: var(--surface); overflow-x: auto; box-shadow: var(--shadow); }
.rede-canvas svg { display: block; width: 100%; min-width: 680px; height: auto; }
.rede-node { cursor: pointer; }
.rede-node:hover circle { stroke: var(--ink); stroke-width: 2.5; }
.rede-node text { font-family: var(--sans); font-size: 11px; fill: var(--ink); pointer-events: none; }
.rede-node .reuso { font-size: 10px; fill: #fff; font-weight: 700; }
.rede-edge { stroke: var(--accent); stroke-width: 1.7; fill: none; }
.rede-edge-label { font-family: var(--sans); font-size: 9px; fill: var(--ink-faint); }
.sec-link { font-size: 13px; font-weight: 600; color: var(--accent); }

/* Seletor de coleção PEA / REA */
.seg-wrap { max-width: var(--maxw); margin: 0 auto; padding: 18px clamp(16px,4vw,40px) 0; }
.segmento { display: inline-flex; background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 999px; padding: 4px; gap: 2px; }
.seg { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--ink-soft); padding: 8px 18px; border-radius: 999px; }
.seg:hover { color: var(--ink); }
.seg small { font-size: 10px; font-weight: 700; letter-spacing: .05em; color: var(--ink-faint); }
.seg b { font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--ink-soft); border-radius: 999px; padding: 1px 8px; }
.seg.on { background: var(--brand); color: #fff; }
.seg.on:hover { color: #fff; }
.seg.on small { color: rgba(255,255,255,.72); }
.seg.on b { background: rgba(255,255,255,.22); color: #fff; }

/* Logo UFPR (à direita do topo) */
.ufpr-logo { flex-shrink: 0; display: flex; align-items: center; margin-left: 8px; padding-left: 16px; border-left: 1px solid var(--rule); }
.ufpr-logo img { height: 40px; width: auto; display: block; background: #fff; border-radius: 6px; padding: 3px 7px; }
@media (max-width: 640px) { .ufpr-logo { padding-left: 10px; margin-left: 3px; } .ufpr-logo img { height: 32px; padding: 2px 5px; } }
