:root {
    --blue-dark: #1f3b73;
    --blue: #2f5aa8;
    --orange: #e8491d;
    --bg: #faf8f4;
    --bg-soft: #f2efe8;
    --card-bg: #fdfcf9;
    --text: #37352f;
    --muted: #787774;
    --border: #e6e1d7;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

/* Header / nav — centrado, tipo tabs Notion */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 18px 20px 0;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 14px;
}

.brand-link {
    display: block;
    line-height: 0;
}

.brand-logo {
    height: 64px;
    width: auto;
    display: block;
}

.main-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 12px;
}

.main-nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    text-align: center;
    white-space: nowrap;
    flex: 0 0 auto;
    transition: background 0.12s ease, color 0.12s ease;
}

.main-nav a:hover {
    background: var(--bg-soft);
    color: var(--text);
}

/* Main content — centrado ao meio */
.site-main {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

#search-wrap { margin-bottom: 48px; }

.search-box {
    width: 100%;
    display: block;
    margin: 0 auto;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--bg-soft);
}

.search-box:focus {
    outline: none;
    border-color: var(--blue);
    background: var(--bg);
}

.search-empty {
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
    margin: 20px 0 0;
}

.category {
    margin-bottom: 56px;
    scroll-margin-top: 96px;
}

.category h2 {
    color: var(--text);
    font-size: 1.4rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    margin-bottom: 8px;
}

.category .note {
    color: var(--muted);
    font-size: 0.88rem;
    margin-bottom: 18px;
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.link-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 0.92rem;
    transition: border-color 0.12s ease, background 0.12s ease;
}

.link-card.placeholder {
    border-style: dashed;
    color: var(--muted);
    font-weight: 500;
}

.link-card:hover {
    border-color: var(--blue);
    background: var(--bg-soft);
}

/* Filtro de tags */
.tag-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.tag-btn {
    font-family: inherit;
    cursor: pointer;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.tag-btn:hover { border-color: var(--blue); color: var(--text); }

.tag-btn.active {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

/* Etiqueta de tag dentro do cartão */
.card-tag {
    align-self: flex-start;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--bg-soft);
    color: var(--muted);
}

.card-tag-geral { background: #eee; color: #5b5b5b; }
.card-tag-credito { background: #e4ebf7; color: var(--blue-dark); }
.card-tag-imobiliario { background: #fbe6dd; color: var(--orange); }
.card-tag-seguros { background: #dff0e6; color: #256b47; }

.doc-grid {
    display: grid;
    gap: 14px;
}

.doc-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 20px;
}

.doc-card.placeholder {
    border-style: dashed;
    color: var(--muted);
}

.doc-card h3 { margin-top: 0; color: var(--text); font-size: 1.05rem; }
.doc-card .summary { white-space: pre-line; color: var(--text); font-size: 0.92rem; }
.doc-card.placeholder .summary { color: var(--muted); }
.doc-card .download { display: inline-block; margin-top: 10px; color: var(--orange); font-weight: 700; text-decoration: none; font-size: 0.9rem; }

.site-footer {
    text-align: center;
    padding: 24px;
    color: var(--muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
}

.site-footer p { margin: 0; }

.footer-admin { margin-top: 6px; }

.footer-admin a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.8rem;
}

.footer-admin a:hover { color: var(--blue); text-decoration: underline; }

.hidden { display: none !important; }
.hidden-view { display: none !important; }

/* Breadcrumb + página interna estilo Notion */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--muted);
    margin-bottom: 28px;
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--blue);
    text-decoration: underline;
}

.breadcrumb-sep { color: var(--border); }

.breadcrumb-current {
    color: var(--text);
    font-weight: 600;
}

.page-content { max-width: 100%; }

.block-heading {
    color: var(--text);
    font-size: 1.15rem;
    margin: 28px 0 10px;
}

.block-heading:first-child { margin-top: 0; }

.block-paragraph {
    color: var(--text);
    font-size: 0.95rem;
    margin: 0 0 14px;
    white-space: pre-line;
}

.checklist {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checklist li {
    font-size: 0.92rem;
    padding-left: 26px;
    position: relative;
}

.checklist li::before {
    content: "\2610";
    position: absolute;
    left: 0;
    color: var(--muted);
}

.block-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 24px 0;
}

.block-callout {
    background: var(--bg-soft);
    border-left: 3px solid var(--orange);
    border-radius: 6px;
    padding: 12px 16px;
    margin: 0 0 20px;
    font-size: 0.88rem;
    color: var(--text);
}

.file-block {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text);
    margin: 0 0 14px;
    max-width: 420px;
}

.file-block:hover {
    border-color: var(--blue);
    background: var(--bg-soft);
}

.file-icon { font-size: 1.1rem; }
.file-label { flex: 1; font-weight: 600; font-size: 0.92rem; }
.file-action { color: var(--orange); font-weight: 700; font-size: 0.85rem; white-space: nowrap; }

.video-block { margin: 0 0 14px; }

.video-title {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 0 0 8px;
}

.video-frame {
    position: relative;
    width: 100%;
    max-width: 640px;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.video-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.video-fallback {
    display: inline-block;
    margin-top: 8px;
    color: var(--orange);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
}

.video-fallback:hover { text-decoration: underline; }

@media (max-width: 600px) {
    .site-main { padding: 28px 16px 60px; }
    .main-nav { gap: 4px; }
    .main-nav a { padding: 6px 10px; font-size: 0.82rem; }
}
