/* Estilos das páginas de guias, ferramentas e editais – Escrevo TCC */
:root {
  --ink: #1b2a33; --ink-soft: #4a5a63; --paper: #faf7f1; --paper-2: #f1ebe0; --card: #ffffff;
  --line: #e3dbcd; --brand: #1f4d45; --brand-dark: #173a34; --brand-soft: #e2efe8;
  --accent: #c2703d; --accent-soft: #f6e6d9; --whats: #1f9d55;
  --radius: 16px; --shadow: 0 1px 2px rgba(27,42,51,.06), 0 8px 24px rgba(27,42,51,.06);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 17px; line-height: 1.7; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 650; line-height: 1.18; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); margin-top: 1.8em; }
h3 { font-size: 1.2rem; margin-top: 1.4em; }
p { margin: 0 0 1em; }
a { color: var(--brand); }
img, svg, iframe { display: block; max-width: 100%; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .88em; background: var(--paper-2); padding: 1px 6px; border-radius: 6px; }
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* Cabeçalho */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250,247,241,.94); backdrop-filter: saturate(160%) blur(8px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-family: "Fraunces", Georgia, serif; font-weight: 650; font-size: 1.3rem; text-decoration: none; color: var(--ink); display: flex; gap: 7px; }
.logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: .95rem; white-space: nowrap; }
.nav-links a:hover, .nav-links a[aria-current=page] { color: var(--ink); }
.nav-links .btn { color: #fff; padding: 9px 16px; font-size: .9rem; }
.menu-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink); }
.menu-toggle svg { width: 26px; height: 26px; }
@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 20px 20px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; font-size: 1rem; }
  .nav-links .btn { margin-top: 8px; padding: 12px; text-align: center; }
}

/* Botões e componentes */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 999px; font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none; background: var(--brand); color: #fff; border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.btn:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--paper-2); }
.btn-whats { background: var(--whats); } .btn-whats:hover { background: #188046; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.breadcrumb { font-size: .86rem; color: var(--ink-soft); margin: 24px 0 8px; }
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.lead { font-size: 1.15rem; color: var(--ink-soft); }
.meta { font-size: .86rem; color: var(--ink-soft); margin-bottom: 28px; }
.page-head { padding: 12px 0 8px; }

/* Artigo */
.article ul, .article ol { padding-left: 24px; margin: 0 0 1.2em; }
.article li { margin-bottom: .45em; }
.toc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 8px 0 28px; }
.toc b { display: block; margin-bottom: 6px; font-size: .92rem; }
.toc ol { margin: 0; padding-left: 20px; font-size: .95rem; }
.toc li { margin-bottom: 2px; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 18px 0 22px; }
.box.tip { background: var(--brand-soft); border-color: transparent; }
.box.warn { background: var(--accent-soft); border-color: transparent; }
.box > :last-child { margin-bottom: 0; }
.example { background: var(--card); border-left: 4px solid var(--brand); border-radius: 0 12px 12px 0; padding: 14px 18px; margin: 10px 0 18px; font-size: .96rem; line-height: 1.6; }
.example small { display: block; color: var(--ink-soft); font-size: .8rem; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.table-wrap { overflow-x: auto; margin: 12px 0 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--paper-2); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 14px 32px 14px 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 1.4rem; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--ink-soft); }

/* Chamada para ação */
.cta { background: var(--brand); color: #fff; border-radius: 22px; padding: 30px; margin: 40px 0; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; }
.cta h2 { color: #fff; margin: 0 0 6px; font-size: 1.5rem; }
.cta p { color: rgba(255,255,255,.82); margin: 0; }
.cta .row { display: flex; gap: 10px; flex-wrap: wrap; }
.cta .btn { background: #fff; color: var(--brand); }
.cta .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.narrow .cta { grid-template-columns: 1fr; }
@media (max-width: 700px) { .cta { grid-template-columns: 1fr; padding: 24px; } }

/* Cards de listagem */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin: 22px 0 40px; }
.card-link { display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease; }
.card-link:hover { transform: translateY(-2px); border-color: var(--brand); }
.card-link .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.card-link .ic svg { width: 22px; height: 22px; }
.card-link h3 { margin: 4px 0 0; font-size: 1.15rem; }
.card-link p { margin: 0; color: var(--ink-soft); font-size: .95rem; line-height: 1.55; }
.card-link .more { margin-top: auto; color: var(--brand); font-weight: 600; font-size: .92rem; }

/* Ferramenta embutida */
.tool-frame { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); min-height: 640px; box-shadow: var(--shadow); }

/* Editais */
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; margin: 18px 0; }
.filters input, .filters select { font: inherit; font-size: 1rem; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); width: 100%; }
@media (max-width: 700px) { .filters { grid-template-columns: 1fr; } }
.editais { display: grid; gap: 14px; margin-bottom: 20px; }
.edital { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: grid; grid-template-columns: 1fr auto; gap: 8px 18px; }
.edital h3 { margin: 0; font-size: 1.1rem; }
.edital .inst { color: var(--ink-soft); font-size: .92rem; }
.edital .dados { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .9rem; color: var(--ink-soft); }
.edital .dados b { color: var(--ink); font-weight: 600; }
.edital .acoes { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.edital .acoes .btn { padding: 9px 16px; font-size: .9rem; }
.prazo { align-self: start; font-size: .78rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); white-space: nowrap; }
.prazo.urgente { background: #f8e3de; color: #7c2a1c; }
.prazo.breve { background: var(--accent-soft); color: #8a4a22; }
.vazio { text-align: center; color: var(--ink-soft); padding: 30px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }

/* Rodapé */
.site-footer { background: var(--ink); color: rgba(255,255,255,.72); padding: 40px 0 28px; font-size: .92rem; margin-top: 56px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
.footer-grid b { color: #fff; display: block; margin-bottom: 8px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 24px; padding-top: 18px; font-size: .84rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

.whats-float { position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 56px; height: 56px; border-radius: 50%; background: var(--whats); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.whats-float svg { width: 28px; height: 28px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
