/*
 * AMMO Digital 360° — Design System (identidade DEMONSTRATIVA, não oficial)
 * Tokens substituíveis pela identidade autenticada (Centro de Identidade / docs/DESIGN-SYSTEM.md).
 * Mobile-first desde 320px · WCAG 2.2 AA · RTL · prefers-reduced-motion · alto contraste.
 */
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* Cor — verde do logótipo AMMO (#355735) e respectivos tons; a paleta lilás/magenta anterior foi retirada a pedido (2026-12-03).
     Paleta provisória: validar com o manual de marca oficial. */
  --ink: #17201a; --ink-2: #2b362d; --muted: #5a655b; --line: #e1e7e0; --line-strong: #c8d3c7;
  --paper: #f8faf7; --surface: #ffffff; --surface-2: #eef3ee;
  --brand: #355735; --brand-ink: #17291a; --brand-soft: #e8f0e7;
  --accent: #4c7a3d; --accent-strong: #2f5530; --accent-soft: #e9f2e4;
  --green: #5d9b4a; --green-strong: #3f6f35; --green-soft: #e6f1e2;
  --hi: #b7dba0; --hi-green: #cfe8b8;
  --ok: #3f6f35; --ok-soft: #e6f1e2; --warn: #8a5a00; --warn-soft: #fbf0d6; --err: #a1302f; --err-soft: #f9e4e3; --info: #1f4f8a; --info-soft: #e5eef9;
  --focus: #4c7a3d;
  /* Tipografia */
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --fs-xs: .78rem; --fs-sm: .875rem; --fs-md: 1rem; --fs-lg: 1.125rem;
  --fs-h3: clamp(1.1rem, 1rem + .4vw, 1.3rem); --fs-h2: clamp(1.4rem, 1.15rem + 1vw, 1.95rem); --fs-h1: clamp(1.75rem, 1.3rem + 2vw, 3rem);
  /* Espaço, raio, sombra */
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4.5rem;
  --r1: 6px; --r2: 10px; --r3: 16px; --r4: 24px;
  --shadow-1: 0 1px 2px rgba(23,41,26,.06), 0 1px 1px rgba(23,41,26,.04);
  --shadow-2: 0 8px 24px rgba(23,41,26,.08), 0 2px 6px rgba(23,41,26,.05);
  --wrap: 1200px; --tap: 44px;
}
[data-contrast="high"] { --ink: #000; --muted: #222; --line: #555; --line-strong: #000; --paper: #fff; --surface-2: #fff; --brand: #0f2a12; --brand-ink: #08160a; --accent: #24481f; --accent-strong: #16300f; --green-strong: #0f4d28; --focus: #d40000; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: var(--fs-md); line-height: 1.6; color: var(--ink); background: var(--paper); text-rendering: optimizeLegibility; overflow-wrap: anywhere; }
img, svg, video, canvas { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 var(--s3); letter-spacing: -.01em; color: var(--brand-ink); }
h1 { font-size: var(--fs-h1); font-weight: 750; } h2 { font-size: var(--fs-h2); font-weight: 700; } h3 { font-size: var(--fs-h3); font-weight: 650; }
p { margin: 0 0 var(--s4); } small, .small { font-size: var(--fs-sm); } .muted { color: var(--muted); }
.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 2rem, 780px); margin-inline: auto; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.skip { position: absolute; inset-inline-start: 1rem; top: -100px; z-index: 100; background: var(--brand); color: #fff; padding: .6rem 1rem; border-radius: var(--r1); }
.skip:focus { top: .75rem; color: #fff; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- Topbar (indicadores ao vivo, aviso de protótipo, idioma, contraste) ---------- */
.topbar { position: relative; z-index: 45; background: var(--brand-ink); color: #cbdccb; font-size: .78rem; }
.topbar .wrap { --wrap: 1320px; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 40px; }
.tb-group { display: flex; align-items: center; gap: .15rem; min-width: 0; }
.tb-start .tb-item + .tb-item { margin-inline-start: .35rem; }
.tb-start .tb-item + .tb-item::before { content: ""; position: absolute; inset-inline-start: -.45rem; top: 50%; width: 1px; height: 14px; transform: translateY(-50%); background: rgba(255,255,255,.14); }
.tb-item { position: relative; display: inline-flex; align-items: center; gap: .4rem; min-height: 30px; padding: .2rem .55rem; border-radius: 999px; color: #cbdccb; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .15s, color .15s; }
.tb-item[hidden] { display: none; }
.tb-item:hover, .tb-item:focus-visible { background: rgba(255,255,255,.08); color: #fff; }
.tb-item:focus-visible, .tb-icon:focus-visible, .tb-demo:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.tb-item strong { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.tb-ic { width: 15px; height: 15px; flex: none; opacity: .85; }
.tb-sub { color: #9fb79f; }
.tb-cur { font-size: .68rem; font-weight: 700; letter-spacing: .06em; color: var(--hi-green); }
.topbar .clock { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 0; }
.topbar .clock .date { color: #cbdccb; font-weight: 500; margin-inline-end: .15rem; }
.tb-wicon { width: 16px; height: 16px; display: inline-block; background: currentColor; color: var(--hi); -webkit-mask: var(--wi) center / contain no-repeat; mask: var(--wi) center / contain no-repeat; }
.tb-wicon[data-w="sun"] { --wi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4.5'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E"); }
.tb-wicon[data-w="cloud"] { --wi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M7 18h10a4 4 0 0 0 .6-8 6 6 0 0 0-11.4 1.5A3.3 3.3 0 0 0 7 18z'/%3E%3C/svg%3E"); color: #d5deea; }
.tb-wicon[data-w="rain"] { --wi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 15h10a4 4 0 0 0 .6-8 6 6 0 0 0-11.4 1.5A3.3 3.3 0 0 0 7 15z'/%3E%3Cpath d='M8 18l-1 3M12 18l-1 3M16 18l-1 3'/%3E%3C/svg%3E"); color: #9cc8f0; }
.tb-wicon[data-w="storm"] { --wi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 15h10a4 4 0 0 0 .6-8 6 6 0 0 0-11.4 1.5A3.3 3.3 0 0 0 7 15z'/%3E%3Cpath d='M12 15l-2 4h4l-2 4'/%3E%3C/svg%3E"); color: #ffd36b; }
/* Aviso de protótipo */
.tb-demo { display: inline-flex; align-items: center; gap: .45rem; min-height: 28px; padding: .15rem .7rem; margin-inline-end: .35rem; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 18%, transparent); color: #e2f0d8; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .15s; }
.tb-demo:hover { background: color-mix(in srgb, var(--accent) 32%, transparent); color: #fff; }
.tb-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hi); box-shadow: 0 0 0 0 rgba(183,219,160,.6); animation: tb-pulse 2.4s ease-out infinite; flex: none; }
@keyframes tb-pulse { 0% { box-shadow: 0 0 0 0 rgba(183,219,160,.55); } 70% { box-shadow: 0 0 0 7px rgba(183,219,160,0); } 100% { box-shadow: 0 0 0 0 rgba(183,219,160,0); } }
.tb-demo-long { display: none; }
/* Idioma */
.tb-lang { position: relative; }
.tb-lang > summary { list-style: none; }
.tb-lang > summary::-webkit-details-marker { display: none; }
.tb-chev { width: 10px; height: 10px; transition: transform .2s; }
.tb-lang[open] > summary { background: rgba(255,255,255,.1); color: #fff; }
.tb-lang[open] .tb-chev { transform: rotate(180deg); }
.tb-menu { position: absolute; inset-inline-end: 0; top: calc(100% + .45rem); z-index: 90; min-width: 230px; margin: 0; padding: .4rem; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px -16px rgba(23,41,26,.4); }
.tb-menu a { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: var(--fs-sm); }
.tb-menu a:hover { background: var(--surface-2); }
.tb-menu a[aria-current="true"] { font-weight: 700; color: var(--brand-ink); background: var(--surface-2); }
.tb-menu a[aria-current="true"]::after { content: "✓"; margin-inline-start: auto; color: var(--accent-strong); }
.tb-flag { width: 20px; height: 15px; flex: none; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.18); }
.tb-menu .tb-flag { width: 24px; height: 18px; }
.tb-code { display: inline-grid; place-items: center; min-width: 2.1rem; height: 1.5rem; border-radius: 6px; background: var(--surface-2); font-size: .68rem; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
/* Contraste */
.tb-icon { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; border: 0; background: transparent; color: #cbdccb; cursor: pointer; transition: background .15s, color .15s; }
.tb-icon svg { width: 16px; height: 16px; }
.tb-icon:hover { background: rgba(255,255,255,.08); color: #fff; }
.tb-icon[aria-pressed="true"] { background: #fff; color: var(--brand-ink); }
/* Responsivo */
.tb-hide-md, .tb-hide-lg { display: none !important; }
.topbar .clock .date { display: none; }
@media (max-width: 639px) { .tb-menu { position: fixed; inset-inline: .75rem; top: 3rem; min-width: 0; } .tb-chev { display: none; } .tb-item { padding-inline: .45rem; } .tb-demo { padding-inline: .55rem; margin-inline-end: .1rem; } }
@media (max-width: 419px) { .tb-weather { display: none !important; } }
@media (min-width: 640px) { .topbar .clock .date { display: inline; } }
@media (min-width: 900px) { .tb-hide-md { display: inline-flex !important; } .tb-demo-long { display: inline; } .tb-demo-tag { display: none; } }
@media (min-width: 1200px) { .tb-hide-lg { display: inline !important; } }
@media (min-width: 1440px) { .topbar .wrap { --wrap: 1360px; } }
@media (min-width: 1600px) { .topbar .wrap { --wrap: 1500px; } }
@media (prefers-reduced-motion: reduce) { .tb-dot { animation: none; } }
[data-contrast="high"] .topbar { background: #000; }
[data-contrast="high"] .tb-item, [data-contrast="high"] .tb-sub { color: #fff; }

/* ---------- Cabeçalho: barra flutuante ---------- */
.header { position: sticky; top: 0; z-index: 40; padding-block: .6rem; background: transparent; transition: padding .2s; }
.header .wrap { --wrap: 1320px; position: relative; }
.hd-bar { display: flex; align-items: center; gap: var(--s3); min-height: 64px; padding: .45rem .55rem .45rem .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 1px 2px rgba(23,41,26,.05), 0 8px 24px -12px rgba(23,41,26,.18); transition: min-height .2s, box-shadow .2s; }
.header.is-scrolled { padding-block: .35rem; }
.header.is-scrolled .hd-bar { min-height: 56px; box-shadow: 0 2px 4px rgba(23,41,26,.06), 0 14px 32px -14px rgba(23,41,26,.3); }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--brand-ink); min-width: 0; flex: 0 1 auto; }
.brand-mark { height: 52px; width: auto; aspect-ratio: 405 / 386; flex: none; object-fit: contain; }
.footer .brand-mark, .mcard .brand-mark { height: 48px; }
.admin-nav .brand-mark { height: 36px; }
[data-contrast="high"] .header .brand-mark { filter: brightness(.55) contrast(1.4); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-text strong { font-size: 1.05rem; letter-spacing: .06em; white-space: nowrap; }
.brand-text span { font-size: .7rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }
.nav { display: none; }
.nav > ul { display: flex; flex-wrap: nowrap; gap: .15rem; list-style: none; margin: 0; padding: .25rem; background: var(--surface-2); border-radius: 999px; }
.nav-btn { background: none; border: 0; font: inherit; font-size: .82rem; font-weight: 600; color: var(--ink-2); padding: .5rem .8rem; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; min-height: 38px; white-space: nowrap; line-height: 1.2; transition: background .15s, color .15s, box-shadow .15s; }
.nav-btn:hover { color: var(--brand-ink); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.nav-btn[aria-expanded="true"] { background: var(--brand-ink); color: #fff; box-shadow: 0 2px 8px -2px rgba(23,41,26,.35); }
.nav-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus) 55%, transparent); outline-offset: 1px; }
.header-actions { display: flex; gap: .35rem; align-items: center; margin-inline-start: auto; flex: none; }
.hd-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--brand-ink); cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s; }
.hd-icon:hover, .hd-icon[aria-expanded="true"] { background: var(--surface-2); border-color: var(--line-strong); }
.hd-icon .icon { width: 19px; height: 19px; }
.hd-desk { display: none; }
.header-actions .hd-account { display: none; }
.hd-account .icon { width: 16px; height: 16px; }
/* Pesquisa por baixo da barra */
.hd-search { margin-top: .5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-2); padding: .5rem; }
.hd-search[hidden] { display: none; }
.hd-search form { position: relative; display: flex; gap: .5rem; align-items: center; }
.hd-search form > .icon { position: absolute; inset-inline-start: .85rem; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.hd-search input[type=search] { flex: 1; min-height: 46px; border-radius: 12px; padding-inline: 2.6rem 1rem; font-size: 1rem; }
/* Painéis do menu: cartão arredondado sob a barra */
.mega { position: absolute; inset-inline: 0; top: 100%; padding-top: .1rem; }
.mega[hidden] { display: none; }
.mega-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 24px 48px -20px rgba(23,41,26,.35); padding: var(--s6); }
.mega-grid { display: grid; grid-template-columns: 1.1fr 2fr; gap: var(--s6); }
.mega-intro p { color: var(--muted); font-size: var(--fs-sm); }
.mega-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: .25rem var(--s4); list-style: none; padding: 0; margin: 0; }
.mega-links a { display: block; padding: .55rem .7rem; border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: var(--fs-sm); }
.mega-links a span { display: block; font-weight: 400; color: var(--muted); font-size: var(--fs-xs); }
.mega-links a:hover { background: var(--surface-2); }
@media (min-width: 640px) { .header-actions .hd-account { display: inline-flex; } }
@media (min-width: 900px) { .hd-desk { display: inline-flex; } }
/* Menu completo numa só linha a partir de 1280px; abaixo usa-se a gaveta (☰). */
@media (min-width: 1280px) {
  .nav { display: block; margin-inline: auto; flex: none; }
  .menu-toggle { display: none !important; }
  .brand { flex: none; }
  .brand-text span { display: none; }
}
@media (min-width: 1280px) and (max-width: 1439px) { .nav-btn { padding-inline: .62rem; font-size: .8rem; } .hd-account span { display: none; } .hd-account { padding-inline: .8rem; } }
@media (min-width: 1440px) { .header .wrap { --wrap: 1360px; } }
@media (min-width: 1600px) { .header .wrap { --wrap: 1500px; } .brand-text span { display: block; } }
@media (max-width: 639px) { .header .wrap { width: calc(100% - 1rem); } }
[data-contrast="high"] .hd-bar, [data-contrast="high"] .mega-card { border-color: currentColor; }
@media (prefers-reduced-motion: reduce) { .header, .hd-bar, .nav-btn { transition: none; } }

/* ---------- Botões ---------- */
.btn { --bg: var(--brand); --fg: #fff; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: var(--tap); padding: .6rem 1.1rem; border-radius: 999px; border: 1px solid var(--bg); background: var(--bg); color: var(--fg); font: inherit; font-weight: 650; font-size: var(--fs-sm); text-decoration: none; cursor: pointer; transition: background .15s, transform .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { --bg: var(--brand-ink); color: var(--fg); box-shadow: var(--shadow-1); }
.btn:active { transform: translateY(1px); }
.btn-accent { --bg: var(--accent); } .btn-accent:hover { --bg: var(--accent-strong); }
.btn-ghost { --bg: transparent; --fg: var(--brand-ink); border-color: var(--line-strong); }
.btn-ghost:hover { --bg: var(--surface-2); --fg: var(--brand-ink); }
.btn-light { --bg: #fff; --fg: var(--brand-ink); border-color: #fff; } .btn-light:hover { --bg: var(--accent-soft); --fg: var(--brand-ink); }
.btn-danger { --bg: var(--err); } .btn-sm { min-height: 36px; padding: .35rem .8rem; font-size: var(--fs-xs); }
.btn-icon { width: var(--tap); padding: 0; border-radius: 50%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.icon { width: 18px; height: 18px; flex: none; }

/* ---------- Menu móvel (drawer) ---------- */
.drawer { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-columns: 1fr; }
.drawer[hidden] { display: none; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(23,41,26,.45); }
.drawer-panel { position: relative; margin-inline-start: auto; width: min(420px, 100%); height: 100%; background: var(--surface); overflow-y: auto; padding: var(--s4); box-shadow: var(--shadow-2); display: flex; flex-direction: column; gap: var(--s3); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer details { border-bottom: 1px solid var(--line); }
.drawer summary { list-style: none; cursor: pointer; padding: .85rem .25rem; font-weight: 700; display: flex; justify-content: space-between; align-items: center; min-height: var(--tap); }
.drawer summary::-webkit-details-marker { display: none; }
.drawer summary::after { content: "+"; font-weight: 400; font-size: 1.3rem; color: var(--muted); }
.drawer details[open] summary::after { content: "–"; }
.drawer ul { list-style: none; margin: 0 0 var(--s3); padding: 0; }
.drawer li a { display: block; padding: .6rem .5rem; text-decoration: none; color: var(--ink); border-radius: var(--r1); min-height: var(--tap); }
.drawer li a:hover { background: var(--surface-2); }
.drawer-quick { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
body.no-scroll { overflow: hidden; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 500px at 85% -10%, #4d7a46 0%, transparent 60%), linear-gradient(160deg, var(--brand-ink), var(--brand) 70%); color: #eef4ed; }
.hero::after { content: none; }
.hero .wrap { position: relative; z-index: 1; padding-block: clamp(2.5rem, 6vw, 5.5rem); display: grid; gap: var(--s6); }
.hero h1 { color: #fff; max-width: 18ch; }
.hero .kicker { color: var(--hi); }
.hero p.lead { font-size: clamp(1.02rem, .95rem + .4vw, 1.25rem); max-width: 60ch; color: #dde9dc; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.hero-search { background: #fff; border-radius: var(--r3); padding: var(--s4); box-shadow: var(--shadow-2); color: var(--ink); }
.hero-search label { font-weight: 700; font-size: var(--fs-sm); display: block; margin-bottom: .4rem; color: var(--brand-ink); }
@media (min-width: 960px) { .hero .wrap { grid-template-columns: 1.3fr 1fr; align-items: end; } }
.kicker { text-transform: uppercase; letter-spacing: .14em; font-size: var(--fs-xs); font-weight: 700; color: var(--accent); margin-bottom: var(--s2); display: block; }

/* ---------- Secções ---------- */
.section { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: var(--s4); margin-bottom: var(--s5); flex-wrap: wrap; }
.section-head p { color: var(--muted); max-width: 62ch; margin: 0; }
.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding-block: clamp(1.75rem, 4vw, 3rem); }
.page-head p.lead { font-size: var(--fs-lg); color: var(--muted); max-width: 70ch; margin: 0; }
.crumbs { font-size: var(--fs-xs); color: var(--muted); margin-bottom: var(--s3); display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; padding: 0; }
.crumbs li + li::before { content: "/"; margin-inline-end: .3rem; color: var(--line-strong); }
.crumbs a { color: var(--muted); }

/* ---------- Grelhas e cartões ---------- */
.grid { display: grid; gap: var(--s4); grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.layout-side { display: grid; gap: var(--s6); }
@media (min-width: 980px) { .layout-side { grid-template-columns: 260px 1fr; } .layout-side.right { grid-template-columns: 1fr 320px; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); padding: var(--s5); box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.card h3 { margin: 0; } .card p { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.card .meta { font-size: var(--fs-xs); color: var(--muted); display: flex; flex-wrap: wrap; gap: .35rem .75rem; }
.card-link { text-decoration: none; color: inherit; transition: border-color .15s, transform .15s, box-shadow .15s; }
.card-link:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); transform: translateY(-2px); color: inherit; }
.card-link h3 { color: var(--brand-ink); }
.card .foot { margin-top: auto; padding-top: var(--s3); display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.card-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-strong); display: grid; place-items: center; }
.card-icon svg { width: 22px; height: 22px; }
.stat { font-size: 1.8rem; font-weight: 750; color: var(--brand-ink); line-height: 1; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); padding: var(--s5); }
.panel + .panel { margin-top: var(--s4); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .7rem; font-weight: 700; letter-spacing: .03em; padding: .2rem .55rem; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; text-transform: uppercase; }
.b-FACTO_VERIFICADO, .b-ok { background: var(--ok-soft); color: var(--ok); border-color: #b9dcc9; }
.b-DEMONSTRACAO { background: #f1f0e2; color: #5c5520; border-color: #e2dcb8; }
.b-PROPOSTA, .b-info { background: var(--info-soft); color: var(--info); border-color: #c7d9f0; }
.b-PENDENTE_DE_VALIDACAO, .b-DEPENDENTE_DE_AUTORIZACAO, .b-warn { background: var(--warn-soft); color: var(--warn); border-color: #ecd59f; }
.b-RESTRICAO_LEGAL, .b-err { background: var(--err-soft); color: var(--err); border-color: #ecbcbb; }
.b-INFORMACAO_HISTORICA { background: var(--accent-soft); color: var(--accent-strong); border-color: #cfe0c4; }
.b-INFORMACAO_DESACTUALIZADA, .b-muted { background: #eceae5; color: #4d4f55; border-color: #d8d4cb; }

/* ---------- Avisos / estados ---------- */
.notice { border-radius: var(--r2); padding: var(--s4); border: 1px solid; display: flex; gap: var(--s3); align-items: flex-start; font-size: var(--fs-sm); }
.notice > svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.notice p:last-child { margin: 0; }
.n-info { background: var(--info-soft); border-color: #c7d9f0; color: #17375f; }
.n-ok { background: var(--ok-soft); border-color: #b9dcc9; color: #154a33; }
.n-warn { background: var(--warn-soft); border-color: #ecd59f; color: #5a3b00; }
.n-err { background: var(--err-soft); border-color: #ecbcbb; color: #6d1f1e; }
.n-demo { background: #f5f3e6; border-color: #e2dcb8; color: #4a4416; }
.empty { text-align: center; padding: var(--s7) var(--s4); border: 1px dashed var(--line-strong); border-radius: var(--r3); background: var(--surface); }
.empty p { color: var(--muted); max-width: 56ch; margin-inline: auto; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), #fff, var(--surface-2)); background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: var(--r1); min-height: 1em; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- Formulários ---------- */
.form { display: grid; gap: var(--s4); }
.field { display: grid; gap: .35rem; min-width: 0; }
.field label, .label { font-weight: 650; font-size: var(--fs-sm); color: var(--ink-2); }
.field .hint { font-size: var(--fs-xs); color: var(--muted); }
.field .error { font-size: var(--fs-xs); color: var(--err); font-weight: 600; }
.input, select, textarea, input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=url], input[type=datetime-local], input[type=file] {
  width: 100%; min-height: var(--tap); padding: .6rem .8rem; border: 1px solid var(--line-strong); border-radius: var(--r2); background: #fff; font: inherit; font-size: 16px; color: var(--ink); }
textarea { min-height: 120px; resize: vertical; }
.input:focus, select:focus, textarea:focus, input:focus { border-color: var(--brand); outline: 3px solid color-mix(in srgb, var(--focus) 45%, transparent); outline-offset: 0; }
[aria-invalid="true"] { border-color: var(--err) !important; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: var(--fs-sm); }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--brand); }
.row { display: grid; gap: var(--s4); } @media (min-width: 640px) { .row-2 { grid-template-columns: 1fr 1fr; } .row-3 { grid-template-columns: repeat(3, 1fr); } }
.search-bar { display: flex; gap: .5rem; } .search-bar input { flex: 1; }
.filters { display: grid; gap: var(--s3); grid-template-columns: 1fr; align-items: end; }
@media (min-width: 720px) { .filters { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } }
.steps { display: flex; gap: .5rem; list-style: none; padding: 0; margin: 0 0 var(--s5); counter-reset: s; flex-wrap: wrap; }
.steps li { counter-increment: s; font-size: var(--fs-xs); color: var(--muted); display: flex; align-items: center; gap: .4rem; }
.steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-weight: 700; }
.steps li[aria-current="step"] { color: var(--brand-ink); font-weight: 700; }
.steps li[aria-current="step"]::before { background: var(--brand); color: #fff; }
fieldset { border: 1px solid var(--line); border-radius: var(--r2); padding: var(--s4); margin: 0; }
legend { font-weight: 700; padding-inline: .3rem; }

/* ---------- Tabelas responsivas ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r2); background: var(--surface); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
th, td { text-align: start; padding: .7rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); position: sticky; top: 0; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: end; font-variant-numeric: tabular-nums; }
@media (max-width: 639px) {
  table.stack thead { display: none; }
  table.stack tr { display: block; border-bottom: 1px solid var(--line); padding: .5rem 0; }
  table.stack td { display: flex; justify-content: space-between; gap: 1rem; border: 0; padding: .3rem .8rem; }
  table.stack td::before { content: attr(data-label); font-weight: 700; color: var(--muted); font-size: var(--fs-xs); text-transform: uppercase; }
}

/* ---------- Listas, separadores ---------- */
.list { list-style: none; padding: 0; margin: 0; } .list > li { padding: var(--s3) 0; border-bottom: 1px solid var(--line); } .list > li:last-child { border-bottom: 0; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; font-size: var(--fs-sm); } .dl dt { font-weight: 700; color: var(--muted); } .dl dd { margin: 0; }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); overflow-x: auto; margin-bottom: var(--s5); }
.tabs a { padding: .7rem 1rem; text-decoration: none; color: var(--muted); font-weight: 650; font-size: var(--fs-sm); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a[aria-current="page"] { color: var(--brand-ink); border-color: var(--accent); }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; } .chip { font-size: var(--fs-xs); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: .25rem .65rem; text-decoration: none; color: var(--ink-2); }
.chip[aria-current="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- Cronologia ---------- */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; inset-inline-start: 11px; top: 4px; bottom: 4px; width: 2px; background: var(--line-strong); }
.timeline li { position: relative; padding-inline-start: 40px; padding-bottom: var(--s5); }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 4px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
.timeline .when { font-weight: 800; color: var(--accent-strong); font-size: var(--fs-sm); }

/* ---------- Leitor editorial ---------- */
.reader { display: grid; gap: var(--s6); }
@media (min-width: 1024px) { .reader { grid-template-columns: 260px minmax(0, 720px); justify-content: center; } .reader-toc { position: sticky; top: 90px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; } }
.prose { font-size: 1.07rem; line-height: 1.75; }
.prose h2 { margin-top: var(--s7); font-size: 1.6rem; } .prose h3 { margin-top: var(--s5); }
.prose blockquote { margin: var(--s5) 0; padding: var(--s3) var(--s5); border-inline-start: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--r2) var(--r2) 0; font-style: italic; }
.prose figure { margin: var(--s5) 0; } .prose figcaption { font-size: var(--fs-sm); color: var(--muted); }
.prose .byline { color: var(--muted); font-size: var(--fs-sm); }
.article + .article { border-top: 1px solid var(--line); margin-top: var(--s7); padding-top: var(--s6); }
.cover { aspect-ratio: 3/4; border-radius: var(--r2); background: linear-gradient(160deg, var(--brand), var(--brand-ink)); color: #fff; padding: var(--s5); display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--shadow-2); position: relative; overflow: hidden; }
.cover::after { content: none; }
.cover * { position: relative; z-index: 1; } .cover h3 { color: #fff; }

/* ---------- Visualizador PDF ---------- */
.pdfv { display: grid; grid-template-rows: auto 1fr; height: calc(100vh - 140px); min-height: 520px; border: 1px solid var(--line); border-radius: var(--r3); overflow: hidden; background: #e9e6df; }
.pdfv-bar { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding: .5rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.pdfv-bar input[type=number] { width: 72px; min-height: 36px; } .pdfv-bar input[type=search] { width: 160px; min-height: 36px; }
.pdfv-body { display: grid; grid-template-columns: 1fr; overflow: hidden; }
@media (min-width: 900px) { .pdfv-body { grid-template-columns: 150px 1fr; } }
.pdfv-thumbs { display: none; overflow-y: auto; padding: .5rem; background: #dedad1; gap: .5rem; flex-direction: column; }
@media (min-width: 900px) { .pdfv-thumbs { display: flex; } }
.pdfv-thumbs button { border: 2px solid transparent; background: #fff; padding: 2px; cursor: pointer; border-radius: 4px; } .pdfv-thumbs button[aria-current="true"] { border-color: var(--accent); }
.pdfv-pages { overflow: auto; padding: 1rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.pdfv-pages canvas { box-shadow: var(--shadow-2); background: #fff; }
.pdfv-hit { background: #ffe58f; }

/* ---------- Câmbio / meteorologia ---------- */
.wx-now { display: flex; gap: var(--s5); align-items: center; flex-wrap: wrap; }
.wx-temp { font-size: clamp(3rem, 8vw, 4.5rem); font-weight: 300; line-height: 1; color: var(--brand-ink); }
.wx-icon { font-size: 3rem; line-height: 1; }
.hscroll { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .5rem; scroll-snap-type: x mandatory; }
.hscroll > * { scroll-snap-align: start; flex: none; min-width: 72px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); padding: .6rem .4rem; font-size: var(--fs-sm); }
.spark { width: 100%; height: 140px; }

/* ---------- Calendário ---------- */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r2); overflow: hidden; }
.cal > div { background: var(--surface); min-height: 64px; padding: .3rem; font-size: var(--fs-xs); }
.cal .dow { min-height: auto; font-weight: 700; text-align: center; background: var(--surface-2); color: var(--muted); }
.cal .today { outline: 2px solid var(--accent); outline-offset: -2px; } .cal .out { background: var(--paper); color: #aaa; }
.cal .ev { display: block; margin-top: 2px; border-radius: 4px; padding: 1px 4px; background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .ev.feriado { background: var(--err-soft); color: var(--err); } .cal .ev.data_religiosa { background: #f1f0e2; color: #5c5520; } .cal .ev.data_cultural { background: var(--accent-soft); color: var(--accent-strong); }

/* ---------- Cartão de associado ---------- */
.mcard { max-width: 420px; aspect-ratio: 1.586; border-radius: 18px; padding: 1.25rem; color: #fff; background: radial-gradient(400px 200px at 100% 0, #2c5683, transparent), linear-gradient(140deg, var(--brand-ink), var(--brand)); box-shadow: var(--shadow-2); display: grid; grid-template-columns: 1fr auto; gap: 1rem; position: relative; overflow: hidden; }
.mcard::after { content: "DEMONSTRAÇÃO"; position: absolute; inset-inline-end: -40px; top: 22px; transform: rotate(35deg); background: var(--hi); color: var(--brand-ink); font-size: .6rem; font-weight: 800; letter-spacing: .12em; padding: .2rem 3rem; }
.mcard .qr { background: #fff; border-radius: 10px; padding: 6px; width: 120px; align-self: end; }

/* ---------- Rodapé ---------- */
.footer { background: var(--brand-ink); color: #c3d3c3; margin-top: var(--s8); font-size: var(--fs-sm); }
.footer a { color: #e6efe5; text-decoration: none; } .footer a:hover { color: var(--hi); text-decoration: underline; }
.footer .wrap { padding-block: var(--s7) var(--s5); }
.footer-grid { display: grid; gap: var(--s6); grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); } }
.footer h2 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: var(--s3); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: var(--s6); padding-top: var(--s4); display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: space-between; align-items: center; font-size: var(--fs-xs); }
.lock { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #88a088 !important; opacity: .6; }
.lock:hover, .lock:focus-visible { opacity: 1; color: #fff !important; background: rgba(255,255,255,.08); }
.lock svg { width: 15px; height: 15px; }

/* ---------- Widget AMMO IA ---------- */
.ai-fab { position: fixed; inset-inline-end: 1rem; bottom: 1rem; z-index: 50; border-radius: 999px; box-shadow: var(--shadow-2); }
.ai-panel { position: fixed; inset-inline-end: 1rem; bottom: 4.6rem; z-index: 55; width: min(400px, calc(100vw - 2rem)); height: min(600px, calc(100vh - 7rem)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); box-shadow: var(--shadow-2); display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; }
.ai-panel[hidden] { display: none; }
.ai-head { padding: .8rem 1rem; background: var(--brand); color: #fff; display: flex; justify-content: space-between; align-items: center; }
.ai-head h2 { color: #fff; font-size: 1rem; margin: 0; }
.ai-log { overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .75rem; font-size: var(--fs-sm); }
.ai-msg { padding: .65rem .85rem; border-radius: 14px; max-width: 92%; white-space: pre-wrap; }
.ai-msg.user { background: var(--brand-soft); align-self: flex-end; }
.ai-msg.bot { background: var(--surface-2); align-self: flex-start; }
.ai-cites { margin-top: .5rem; display: grid; gap: .3rem; font-size: var(--fs-xs); }
.ai-cites a { display: block; }
.ai-form { display: flex; gap: .4rem; padding: .6rem; border-top: 1px solid var(--line); }
.ai-sugg { display: flex; gap: .35rem; flex-wrap: wrap; }
.ai-sugg button { font: inherit; font-size: var(--fs-xs); border: 1px solid var(--line-strong); background: #fff; border-radius: 999px; padding: .3rem .6rem; cursor: pointer; }
@media (max-width: 480px) { .ai-panel { inset: 0; width: 100%; height: 100%; border-radius: 0; bottom: 0; inset-inline-end: 0; } }

/* ---------- Toasts ---------- */
.toasts { position: fixed; top: 1rem; inset-inline-end: 1rem; z-index: 70; display: grid; gap: .5rem; width: min(420px, calc(100vw - 2rem)); }
.toast { box-shadow: var(--shadow-2); }

/* ---------- Admin ---------- */
.admin-shell { display: grid; min-height: 100vh; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .admin-shell { grid-template-columns: 270px 1fr; } }
.admin-nav { background: var(--brand-ink); color: #d3dfd3; padding: var(--s4); font-size: var(--fs-sm); }
.admin-nav a { color: #e6efe5; text-decoration: none; display: block; padding: .35rem .5rem; border-radius: var(--r1); }
.admin-nav a:hover, .admin-nav a[aria-current="page"] { background: rgba(255,255,255,.1); }
.admin-nav h3 { color: #9fb79f; font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; margin: var(--s4) 0 var(--s1); }
.admin-main { padding: var(--s5); min-width: 0; }
@media (max-width: 1023px) { .admin-nav details:not([open]) > :not(summary) { display: none; } }
.code { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; }
textarea.code { min-height: 260px; }

/* ---------- Paginação ---------- */
.pager { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: center; margin-top: var(--s5); list-style: none; padding: 0; }
.pager a, .pager span { min-width: var(--tap); min-height: var(--tap); display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r1); text-decoration: none; background: var(--surface); padding: 0 .6rem; }
.pager [aria-current="page"] { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- Utilidades ---------- */
.flex { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; } .between { justify-content: space-between; }
.stack > * + * { margin-top: var(--s4); } .mt-0 { margin-top: 0; } .mt-4 { margin-top: var(--s4); } .mt-6 { margin-top: var(--s6); } .mb-0 { margin-bottom: 0; }
.center { text-align: center; } .w-full { width: 100%; }
.divider { height: 1px; background: var(--line); margin: var(--s5) 0; border: 0; }
.map-moz { width: 100%; max-width: 520px; }
.map-moz .prov { fill: var(--brand-soft); stroke: #fff; stroke-width: 2; }
.map-moz .dot-confirmada { fill: var(--ok); } .map-moz .dot-historica { fill: var(--accent); } .map-moz .dot-nao_confirmada { fill: #b9b3a6; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; } }
/* ---------- Fotografias de contexto (Wikimedia Commons, licenças livres; créditos em /creditos-imagens) ---------- */
/* Faixa de imagem no topo dos cartões */
.card-media { margin: calc(var(--s5) * -1) calc(var(--s5) * -1) var(--s2); aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r3) var(--r3) 0 0; background: var(--brand-ink); position: relative; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card-media .badge-on-media { position: absolute; inset-block-start: .6rem; inset-inline-start: .6rem; }
.card-link:hover .card-media img { transform: scale(1.05); }
.card-media.short { aspect-ratio: 21 / 9; }
/* Cartão horizontal com miniatura (agenda, oportunidades) */
.card-row { display: grid; grid-template-columns: 96px 1fr; gap: var(--s4); align-items: center; }
.card-row .thumb { width: 96px; height: 96px; border-radius: 14px; overflow: hidden; background: var(--brand-ink); flex: none; }
.card-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-row .body { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.date-chip { flex: none; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 96px; height: 96px; border-radius: 14px; color: #fff; font-weight: 800; line-height: 1; background: linear-gradient(rgba(23,41,26,.35), rgba(23,41,26,.8)), var(--art) center / cover; }
.date-chip b { font-size: 1.9rem; } .date-chip span { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; margin-top: .25rem; color: var(--hi); }
@media (max-width: 420px) { .card-row { grid-template-columns: 72px 1fr; } .card-row .thumb, .date-chip { width: 72px; height: 72px; } .date-chip b { font-size: 1.4rem; } }
/* Capas (publicações, loja, discos): ilustração por baixo do texto */
.cover { background-image: linear-gradient(180deg, rgba(23,41,26,.15) 0%, rgba(23,41,26,.85) 100%), var(--art, linear-gradient(160deg, var(--brand), var(--brand-ink))); background-size: cover; background-position: center; }
.cover[style*="--art"]::after { opacity: 0; }
.cover { background-image: linear-gradient(180deg, rgba(23,41,26,.25) 0%, rgba(23,41,26,.88) 100%), var(--art, linear-gradient(160deg, var(--brand), var(--brand-ink))); }
/* Hero com ilustração de palco */
.hero { background: linear-gradient(90deg, var(--brand-ink) 0%, rgba(23,41,26,.9) 36%, rgba(23,41,26,.45) 70%, rgba(23,41,26,.3) 100%), url("/img/photos/ammo-sede-ensaio.jpg") 70% 30% / cover no-repeat, var(--brand-ink); }
.hero::after { display: none; }
.hero-credit { position: absolute; inset-block-end: .5rem; inset-inline-end: 1rem; z-index: 1; font-size: .68rem; color: rgba(255,255,255,.72); max-width: 60ch; text-align: end; }
.hero-credit a { color: inherit; }
@media (max-width: 959px) { .hero { background: linear-gradient(180deg, rgba(23,41,26,.72), rgba(23,41,26,.95)), url("/img/photos/ammo-sede-ensaio.jpg") 60% 30% / cover no-repeat, var(--brand-ink); } .hero-credit { position: static; display: block; padding: 0 1rem .75rem; text-align: start; } }
/* Figuras com legenda */
.figure { margin: 0; border-radius: var(--r3); overflow: hidden; background: var(--brand-ink); box-shadow: var(--shadow-2); }
.figure img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.figure.banner img { aspect-ratio: 32 / 9; }
@media (max-width: 639px) { .figure.banner img { aspect-ratio: 16 / 9; } }
.figure figcaption a { color: #fff; }
.figure figcaption { padding: .6rem .9rem; font-size: var(--fs-xs); color: #cbdccb; background: var(--brand-ink); }
/* Fundos de secção */
/* Faixa de chamada (CTA) com imagem */
.cta-band { position: relative; overflow: hidden; border-radius: var(--r4); color: #fff; padding: clamp(1.5rem, 4vw, 3rem); background: linear-gradient(90deg, rgba(23,41,26,.97) 0%, rgba(23,41,26,.85) 50%, rgba(23,41,26,.3) 100%), url("/img/photos/ammo-sede-jam.jpg") right 30% / cover no-repeat; display: grid; gap: var(--s4); align-items: center; }
.cta-band h2 { color: #fff; } .cta-band p { color: #dde9dc; }
@media (min-width: 900px) { .cta-band { grid-template-columns: 1.4fr 1fr; } }
/* Estado vazio com ilustração */
/* Rodapé com textura */
@media (prefers-reduced-motion: reduce) { .card-media img { transition: none; } }
@media print { .card-media, .card-row .thumb, .page-head::after, .hero-credit { display: none !important; } }

@media print { .header, .topbar, .footer, .ai-fab, .ai-panel, .no-print, .reader-toc { display: none !important; } body { background: #fff; } .prose { font-size: 11pt; } a { color: inherit; } }
[dir="rtl"] .nav-btn svg, [dir="rtl"] .arrow { transform: scaleX(-1); }

/* ---------- Música e Património (home): fotografia a toda a altura + factos + acessos ---------- */
.heritage { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r4); overflow: hidden; box-shadow: var(--shadow-2); }
.heritage-media { position: relative; margin: 0; min-height: 260px; background: var(--brand-ink); }
.heritage-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.heritage-media figcaption { position: absolute; inset: auto 0 0 0; padding: var(--s6) var(--s4) var(--s3); color: #fff; font-size: .85rem; line-height: 1.4; background: linear-gradient(to top, rgba(23, 41, 26, .92), rgba(23, 41, 26, 0)); }
.heritage-media figcaption span { display: block; margin-top: .2rem; font-size: .72rem; opacity: .8; }
.heritage-body { padding: var(--s5); display: grid; gap: var(--s4); align-content: center; }
.heritage-body h2 { margin: 0; }
.heritage-body p { margin: 0; }
.heritage-facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin: 0; }
.heritage-facts div { padding: var(--s3); border-radius: var(--r2); background: var(--surface-2); border-inline-start: 4px solid var(--accent); }
.heritage-facts dt { font-size: 1.6rem; font-weight: 800; line-height: 1; color: var(--brand); }
.heritage-facts dd { margin: .35rem 0 0; font-size: .82rem; color: var(--muted); line-height: 1.35; }
.heritage-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.heritage-tile { display: flex; align-items: center; gap: var(--s3); padding: .5rem; border: 1px solid var(--line); border-radius: var(--r2); color: var(--ink); text-decoration: none; background: var(--surface); transition: border-color .15s, transform .15s, box-shadow .15s; }
.heritage-tile:hover, .heritage-tile:focus-visible { border-color: var(--accent); box-shadow: var(--shadow-1); transform: translateY(-1px); }
.heritage-tile img { width: 3.25rem; height: 3.25rem; flex: none; border-radius: calc(var(--r2) - 2px); object-fit: cover; }
.heritage-tile span { display: grid; flex: 1; min-width: 0; }
.heritage-tile b { font-size: .95rem; }
.heritage-tile small { color: var(--muted); font-size: .78rem; }
.heritage-tile svg { width: 1.1rem; height: 1.1rem; flex: none; color: var(--accent); }
[dir="rtl"] .heritage-tile svg { transform: scaleX(-1); }
.heritage-people { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); margin-top: var(--s4); padding: var(--s3) var(--s4); border-radius: var(--r3); background: var(--brand-ink); color: #fff; font-size: .9rem; }
.heritage-people strong { color: var(--hi); margin-inline-end: var(--s2); }
.heritage-people a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .35); }
.heritage-people a:hover, .heritage-people a:focus-visible { border-bottom-color: var(--hi); }
.heritage-people small { opacity: .7; }
@media (max-width: 479px) { .heritage-tiles { grid-template-columns: 1fr; } .heritage-facts dt { font-size: 1.3rem; } .heritage-facts dd { font-size: .76rem; } .heritage-media { min-height: 220px; } }
@media (min-width: 900px) {
  .heritage { grid-template-columns: 5fr 7fr; }
  .heritage-media { min-height: 100%; }
  .heritage-body { padding: var(--s6); }
}
[data-contrast="high"] .heritage, [data-contrast="high"] .heritage-tile { border-color: currentColor; }
[data-contrast="high"] .heritage-people { background: #000; }

/* ---------- Hero por trás do cabeçalho flutuante (página inicial) ----------
   O hero sobe para trás da barra do menu.
   O cabeçalho não tem fundo (sem degradê): só a barra branca flutua sobre o conteúdo. */
:root { --hd-h: 86px; }

body:has(.hero, .page-head) .header:not(.is-scrolled) .hd-bar { box-shadow: 0 10px 30px -12px rgba(0,0,0,.45); border-color: rgba(255,255,255,.6); }
.hero { margin-top: calc(var(--hd-h) * -1); }
.hero .wrap { padding-top: calc(var(--hd-h) + clamp(2.5rem, 6vw, 5.5rem)); }
@media (max-width: 959px) { .hero-credit { margin: 0; } }

/* ---------- Hero das páginas interiores ----------
   Banda verde do logótipo que sobe para trás do menu flutuante (como na página inicial),
   com a fotografia do tema à direita, esbatida para o verde. Sem fotografia, fica só o verde. */
.page-head {
  position: relative; overflow: hidden; isolation: isolate;
  margin-top: calc(var(--hd-h) * -1);
  padding-block: calc(var(--hd-h) + clamp(1.75rem, 4vw, 3.25rem)) clamp(2rem, 4.5vw, 3.5rem);
  min-height: clamp(250px, 26vw, 360px); display: grid; align-content: end;
  background: radial-gradient(900px 380px at 0% 0%, rgba(93,155,74,.28), transparent 65%), linear-gradient(135deg, var(--brand-ink) 0%, #21402a 55%, var(--brand) 100%);
  color: #eef4ed; border-bottom: 0;
}
.page-head::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, var(--brand-ink) 0%, rgba(23,41,26,.92) 38%, rgba(23,41,26,.55) 68%, rgba(23,41,26,.35) 100%); }
.page-head::after { content: ""; position: absolute; inset-block: 0; inset-inline-end: 0; width: min(62%, 900px); z-index: -2;
  background: var(--head-art, none) center 35% / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%); mask-image: linear-gradient(90deg, transparent 0%, #000 45%); }
[dir="rtl"] .page-head::before { background: linear-gradient(270deg, var(--brand-ink) 0%, rgba(23,41,26,.92) 38%, rgba(23,41,26,.55) 68%, rgba(23,41,26,.35) 100%); }
[dir="rtl"] .page-head::after { -webkit-mask-image: linear-gradient(270deg, transparent 0%, #000 45%); mask-image: linear-gradient(270deg, transparent 0%, #000 45%); }
.page-head h1 { color: #fff; max-width: 22ch; margin-bottom: .6rem !important; text-wrap: balance; }
.page-head p.lead { color: #d6e5d4; max-width: 62ch; }
.page-head .kicker { color: var(--hi); }
.page-head .crumbs { color: rgba(238,244,237,.7); margin-bottom: var(--s4); }
.page-head .crumbs a { color: rgba(238,244,237,.85); text-decoration-color: rgba(255,255,255,.35); }
.page-head .crumbs a:hover { color: #fff; }
.page-head .crumbs li + li::before { color: rgba(255,255,255,.35); }
.page-head .crumbs [aria-current] { color: #fff; font-weight: 600; }
.page-head .badge { box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.page-head .btn-ghost { --fg: #fff; border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.06); }
.page-head .btn-ghost:hover { --bg: rgba(255,255,255,.16); --fg: #fff; }
.page-head .muted, .page-head .small { color: rgba(238,244,237,.75); }
/* filete de acento na base */
.page-head > .wrap::after { content: ""; display: block; width: 72px; height: 4px; border-radius: 4px; margin-top: var(--s5); background: linear-gradient(90deg, var(--hi), var(--green)); }
@media (max-width: 759px) {
  .page-head { min-height: 0; }
  .page-head::after { width: 100%; -webkit-mask-image: none; mask-image: none; }
  .page-head::before { background: linear-gradient(180deg, rgba(23,41,26,.78), rgba(23,41,26,.95)); }
}
[data-contrast="high"] .page-head { background: #000; }
[data-contrast="high"] .page-head::after, [data-contrast="high"] .page-head::before { display: none; }
@media print {
  .page-head { margin-top: 0; padding-block: 0 1rem; min-height: 0; background: none; color: #000; }
  .page-head::before, .page-head::after, .page-head > .wrap::after { display: none; }
  .page-head h1, .page-head p.lead, .page-head .crumbs, .page-head .crumbs a { color: #000; }
}

/* ---------- Menu activo ----------
   A área da página actual fica marcada na calha do menu, também nas subpáginas; a ligação exacta fica marcada no submenu. */
.nav-btn.is-active { background: var(--surface); color: var(--brand-ink); box-shadow: inset 0 0 0 1.5px var(--brand), 0 2px 6px -3px rgba(23,41,26,.3); }
.nav-btn.is-active::after { content: ""; position: absolute; inset-inline: 30%; bottom: 3px; height: 2px; border-radius: 2px; background: var(--brand); }
.nav-btn { position: relative; }
.nav-btn.is-active[aria-expanded="true"] { background: var(--brand-ink); color: #fff; }
.nav-btn.is-active[aria-expanded="true"]::after { background: var(--hi); }
.mega-links a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); box-shadow: inset 3px 0 0 var(--brand); }
[dir="rtl"] .mega-links a[aria-current="page"] { box-shadow: inset -3px 0 0 var(--brand); }
.drawer summary.is-active { color: var(--brand); }
.drawer summary.is-active::before { content: ""; width: 4px; height: 1.2em; border-radius: 2px; background: var(--brand); margin-inline-end: .55rem; }
.drawer summary.is-active { justify-content: flex-start; } .drawer summary.is-active::after { margin-inline-start: auto; }
.drawer a[aria-current="page"] { font-weight: 700; color: var(--brand-ink); background: var(--brand-soft); border-radius: 8px; }
[data-contrast="high"] .nav-btn.is-active { box-shadow: inset 0 0 0 2px currentColor; }
