/* =========================================================
   ALA — Associação Lusitana de Airsoft
   Design system: claro, minimalista, tático.
   ========================================================= */

:root {
  /* cor */
  --bg: #f3f2ec;          /* bone */
  --bg-2: #eae8df;        /* painel */
  --surface: #fbfaf6;
  --ink: #14160f;
  --ink-2: #3a3d33;
  --muted: #74776b;
  --line: #d9d6ca;
  --line-2: #c6c2b3;
  --olive: #4a5a2b;       /* acento principal */
  --olive-2: #6b7d3f;
  --olive-soft: #e3e6d3;
  --signal: #e2591b;      /* laranja de sinalização — usar com parcimónia */
  --pt-green: #00873e;
  --pt-yellow: #ffd400;
  --pt-red: #da0e1b;

  /* tipografia */
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* espaço */
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1280px;
  --radius: 4px;
  --header-h: 68px;

  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
::selection { background: var(--olive); color: var(--bg); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
button { font: inherit; color: inherit; }

/* ---------- tipografia ---------- */
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.025em; line-height: 1.05; font-stretch: 112%; }
.display { font-size: clamp(42px, 6.4vw, 108px); line-height: .92; letter-spacing: -0.045em; font-weight: 800; font-stretch: 125%; }
.h1 { font-size: clamp(38px, 6vw, 84px); line-height: .96; letter-spacing: -0.04em; font-weight: 800; font-stretch: 120%; }
.h2 { font-size: clamp(30px, 4vw, 54px); letter-spacing: -0.035em; }
.h3 { font-size: clamp(21px, 2vw, 26px); letter-spacing: -0.02em; line-height: 1.15; }
.lead { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; color: var(--ink-2); max-width: 46ch; }
.muted { color: var(--muted); }
p { margin: 0 0 1em; }

/* rótulo mono, estilo HUD */
.label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: .6em;
}
.label::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.label.no-rule::before { display: none; }
.label .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--signal); }
.mono { font-family: var(--mono); font-size: .86em; letter-spacing: .02em; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(72px, 11vw, 160px) 0; position: relative; }
.section.tight { padding: clamp(48px, 7vw, 96px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section.alt { background: var(--bg-2); }
.section.dark { background: var(--ink); color: var(--bg); }
.section.dark .muted, .section.dark .label { color: #9c9f92; }
.section.dark .card { background: #1c1f16; border-color: #2c3023; }
.section-head { display: grid; gap: 20px; margin-bottom: clamp(40px, 6vw, 80px); }
.section-head.split { grid-template-columns: 1fr; align-items: end; }
@media (min-width: 900px) { .section-head.split { grid-template-columns: 1.2fr 1fr; gap: 64px; } }
.grid { display: grid; gap: clamp(16px, 2vw, 24px); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.stack > * + * { margin-top: var(--stack, 16px); }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-color: var(--line); }
.site-header.hidden { transform: translateY(-100%); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; letter-spacing: -.01em; }
.brand svg { width: 44px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font-size: 17px; font-stretch: 120%; letter-spacing: .02em; }
.brand-text span { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.nav { display: none; align-items: center; gap: 4px; }
.nav a {
  text-decoration: none; font-size: 15px; font-weight: 500;
  padding: 8px 12px; border-radius: var(--radius); color: var(--ink-2);
  position: relative; transition: color .2s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: var(--olive);
}
.header-cta { display: none; gap: 8px; }
@media (min-width: 1080px) { .nav, .header-cta { display: flex; } .menu-btn { display: none !important; } }

.menu-btn {
  width: 44px; height: 44px; border: 1px solid var(--line-2); background: transparent; border-radius: var(--radius);
  display: grid; place-items: center; cursor: pointer;
}
.menu-btn span { display: block; width: 18px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease); }
.menu-btn span + span { margin-top: 5px; }
.menu-open .menu-btn span:first-child { transform: translateY(3.25px) rotate(45deg); }
.menu-open .menu-btn span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 40; background: var(--bg);
  padding: calc(var(--header-h) + 24px) var(--gutter) 32px;
  display: flex; flex-direction: column; justify-content: space-between;
  opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s;
  overflow-y: auto;
}
.menu-open .mobile-menu { opacity: 1; visibility: visible; }
.menu-open { overflow: hidden; }
.mobile-menu nav a {
  display: flex; justify-content: space-between; align-items: baseline;
  text-decoration: none; font-size: clamp(20px, 5.6vw, 28px); font-weight: 650; font-stretch: 112%; letter-spacing: -.02em;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  transform: translateY(12px); opacity: 0; transition: transform .5s var(--ease), opacity .5s var(--ease);
}
.mobile-menu nav a small { font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 400; letter-spacing: .08em; }
.menu-open .mobile-menu nav a { transform: none; opacity: 1; }
.mobile-menu nav a[aria-current="page"] { color: var(--olive); }
.mobile-menu .row { margin-top: 32px; }

/* ---------- botões ---------- */
.btn {
  --b: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px; border-radius: var(--radius);
  font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap;
  background: var(--b); color: var(--bg); border: 1px solid var(--b);
  cursor: pointer; position: relative; overflow: hidden;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s, transform .2s;
}
.btn:hover { background: var(--olive); border-color: var(--olive); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; }
.btn.signal { --b: var(--signal); }
.btn.signal:hover { background: var(--ink); border-color: var(--ink); }
.btn.sm { height: 38px; padding: 0 14px; font-size: 14px; }
.section.dark .btn { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.section.dark .btn:hover { background: var(--olive-2); border-color: var(--olive-2); color: var(--bg); }
.section.dark .btn.ghost { background: transparent; color: var(--bg); border-color: #4a4e40; }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; font-size: 15px; }
.link-arrow svg { width: 14px; height: 14px; transition: transform .3s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- cartões ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 2.6vw, 32px); position: relative;
  transition: border-color .3s var(--ease), transform .4s var(--ease), box-shadow .4s var(--ease);
}
a.card { text-decoration: none; display: block; }
a.card:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(20, 22, 15, .35); }
/* cantos de mira (HUD) */
.corners { position: relative; }
.corners::before, .corners::after {
  content: ""; position: absolute; width: 12px; height: 12px; pointer-events: none;
  border: 1.5px solid var(--ink); transition: all .35s var(--ease); opacity: 0;
}
.corners::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.corners::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.corners:hover::before, .corners:hover::after { opacity: 1; }
.corners:hover::before { top: -6px; left: -6px; }
.corners:hover::after { bottom: -6px; right: -6px; }

.card .num { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.card h3 { margin: 14px 0 10px; }
.card p:last-child { margin-bottom: 0; }
.icon-box {
  width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: var(--radius);
  display: grid; place-items: center; color: var(--olive);
}
.icon-box svg { width: 22px; height: 22px; }

/* ---------- tags / chips ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-2); background: transparent;
}
.tag.olive { background: var(--olive-soft); border-color: transparent; color: var(--olive); }
.tag.signal { background: var(--signal); border-color: transparent; color: #fff; }
.chip {
  height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent;
  font-size: 14px; font-weight: 500; cursor: pointer; transition: all .2s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- formulários ---------- */
.input {
  height: 48px; width: 100%; padding: 0 16px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius);
  transition: border-color .2s;
}
.input:focus { outline: none; border-color: var(--ink); }

/* ---------- faixa da bandeira (do logótipo) ---------- */
.flag-rule { display: flex; height: 4px; width: 72px; transform: skewX(-30deg); }
.flag-rule i { flex: 3; background: var(--pt-green); }
.flag-rule i:nth-child(2) { flex: .5; background: var(--pt-yellow); }
.flag-rule i:nth-child(3) { flex: 5; background: var(--pt-red); }

/* ---------- page hero (páginas interiores) ---------- */
.page-hero { padding: calc(var(--header-h) + clamp(56px, 10vw, 140px)) 0 clamp(48px, 7vw, 96px); position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero .h1 { margin: 22px 0 24px; max-width: 14ch; }
.page-hero canvas.topo { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .55; pointer-events: none; }
.breadcrumbs { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: flex; gap: 10px; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--ink); }

/* ---------- índice lateral (páginas longas) ---------- */
.with-toc { display: grid; gap: 48px; }
@media (min-width: 1000px) { .with-toc { grid-template-columns: 240px 1fr; gap: 80px; } }
.toc { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; display: none; }
@media (min-width: 1000px) { .toc { display: block; } }
.toc a {
  display: block; text-decoration: none; font-size: 14px; color: var(--muted);
  padding: 7px 0 7px 16px; border-left: 1px solid var(--line); transition: all .2s;
}
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--ink); border-left: 2px solid var(--olive); padding-left: 15px; font-weight: 600; }

/* ---------- prosa (texto longo) ---------- */
.prose { max-width: 70ch; color: var(--ink-2); }
.prose h2 { font-size: clamp(26px, 3vw, 38px); color: var(--ink); margin: 2.2em 0 .7em; }
.prose h3 { font-size: 21px; color: var(--ink); margin: 1.8em 0 .6em; letter-spacing: -.015em; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--olive); }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--olive); font-size: 1.1em; color: var(--ink); }
.prose strong { color: var(--ink); }
.prose a { color: var(--olive); font-weight: 500; }
.prose img { border-radius: var(--radius); margin: 1.6em 0; border: 1px solid var(--line); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 1.4em 0; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 500; }

/* ---------- acordeão (FAQ) ---------- */
.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary {
  list-style: none; cursor: pointer; padding: 22px 48px 22px 0; position: relative;
  font-weight: 600; font-size: clamp(17px, 1.5vw, 19px); letter-spacing: -.01em;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 14px 1.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 1.5px 14px no-repeat;
  transition: transform .3s var(--ease);
}
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion .answer { padding: 0 0 24px; color: var(--ink-2); max-width: 70ch; }

/* ---------- lista de documentos ---------- */
.doc-list { border-top: 1px solid var(--line); }
.doc {
  display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center;
  padding: 18px 4px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background .2s, padding .3s var(--ease);
}
.doc:hover { background: var(--surface); padding-left: 14px; padding-right: 14px; }
.doc .ext {
  font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .08em;
  width: 42px; height: 50px; border: 1px solid var(--line-2); border-radius: 3px;
  display: grid; place-items: end center; padding-bottom: 7px; position: relative; background: var(--surface);
}
.doc .ext::before { content: ""; position: absolute; top: -1px; right: -1px; width: 12px; height: 12px; background: var(--bg); border-left: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.doc h4 { font-size: 16px; letter-spacing: -.01em; font-weight: 600; font-stretch: 100%; line-height: 1.3; }
.doc p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.doc .go { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; transition: all .3s var(--ease); }
.doc:hover .go { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.doc .go svg { width: 14px; height: 14px; }

/* ---------- estatísticas ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
@media (min-width: 800px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 28px 0 0; border-right: 1px solid var(--line); padding-right: 16px; }
.stat:nth-child(2n) { padding-left: 16px; }
@media (min-width: 800px) { .stat + .stat { padding-left: 24px; } }
.stat:last-child { border-right: 0; }
@media (max-width: 799px) { .stat:nth-child(2n) { border-right: 0; } .stat:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 28px; } }
.stat b { display: block; font-size: clamp(44px, 6vw, 76px); font-weight: 800; letter-spacing: -.05em; line-height: 1; font-stretch: 125%; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 10px; font-size: 14px; color: var(--muted); max-width: 22ch; }

/* ---------- notícias (cartão) ---------- */
.news-card { display: flex; flex-direction: column; gap: 14px; text-decoration: none; }
.news-card .thumb { aspect-ratio: 16 / 10; background: var(--bg-2); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); position: relative; }
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), filter .6s; filter: grayscale(.35) contrast(1.02); }
.news-card:hover .thumb img { transform: scale(1.04); filter: none; }
.news-card .meta { display: flex; gap: 12px; align-items: center; font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.news-card h3 { font-size: 21px; letter-spacing: -.02em; line-height: 1.2; font-stretch: 105%; }
.news-card:hover h3 { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.news-card p { margin: 0; color: var(--muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* thumb de reserva quando não há imagem */
.thumb-fallback { position: absolute; inset: 0; display: grid; place-items: center; background: var(--ink); color: var(--bg); }
.thumb-fallback svg { width: 34%; opacity: .9; }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 18px 0; white-space: nowrap; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: inline-flex; gap: 48px; animation: marquee 40s linear infinite; padding-right: 48px; }
.marquee-track span { font-family: var(--mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 48px; }
.marquee-track span::after { content: "+"; color: var(--olive); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #c9cbbf; padding: clamp(64px, 9vw, 120px) 0 32px; position: relative; overflow: hidden; }
.site-footer a { text-decoration: none; color: #c9cbbf; transition: color .2s; }
.site-footer a:hover { color: #fff; }
.footer-top { display: grid; gap: 48px; }
@media (min-width: 900px) { .footer-top { grid-template-columns: 1.4fr repeat(3, 1fr); } }
.footer-top h5 { margin: 0 0 18px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #7f8275; font-weight: 500; }
.footer-top ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 15px; }
.footer-brand p { max-width: 36ch; font-size: 15px; color: #9c9f92; margin-top: 20px; }
.footer-big {
  font-size: clamp(44px, 12.4vw, 178px); font-weight: 800; letter-spacing: -.04em; line-height: .8; font-stretch: 125%;
  color: transparent; -webkit-text-stroke: 1px #3a3e31; margin: clamp(56px, 8vw, 110px) 0 28px; user-select: none; white-space: nowrap;
}
.footer-bottom { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; padding-top: 24px; border-top: 1px solid #2c3023; font-size: 13px; color: #7f8275; }
.footer-bottom .mono { font-size: 12px; }

/* ---------- animações de entrada ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal, .reduced .reveal { opacity: 1; transform: none; }
.split-line { display: block; overflow: hidden; padding-bottom: .06em; }
.split-line > span { display: block; transform: translateY(105%); transition: transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.in .split-line > span, .split-line.in > span { transform: none; }
.reduced .split-line > span { transform: none; }

/* ---------- utilitários ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; } .mt-5 { margin-top: 64px; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.hr { height: 1px; background: var(--line); border: 0; margin: 0; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--radius); }
.skip:focus { left: 8px; }
.callout { border: 1px solid var(--line); border-left: 3px solid var(--signal); background: var(--surface); padding: 18px 22px; border-radius: var(--radius); font-size: 15px; }
.callout.olive { border-left-color: var(--olive); }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: var(--radius); font-size: 14px; z-index: 80; transition: transform .4s var(--ease); }
.toast.show { transform: translate(-50%, 0); }

/* botões dentro do índice lateral não herdam o estilo dos links do índice */
.toc a.btn { display: inline-flex; color: var(--bg); padding: 0 16px; border: 1px solid var(--ink); font-weight: 600; width: 100%; }
.toc a.btn:hover { color: var(--bg); border-color: var(--olive); }
.toc a.btn.ghost { color: var(--ink); border-color: var(--line-2); }
.brand-text span { white-space: nowrap; }
@media (max-width: 400px) { .site-header .brand-text span { font-size: 8.5px; letter-spacing: .06em; } }

/* =========================================================
   Mobile — prioridade à informação essencial
   ========================================================= */

/* barra de ação fixa */
.mbar {
  position: fixed; z-index: 45;
  left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right));
  bottom: max(10px, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 8px;
  padding: 7px 7px 7px 16px; border-radius: 10px;
  background: color-mix(in srgb, var(--ink) 94%, transparent); color: var(--bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 14px 34px -14px rgba(20, 22, 15, .55);
  transform: translateY(calc(100% + 24px)); opacity: 0; visibility: hidden;
  transition: transform .45s var(--ease), opacity .3s var(--ease), visibility .45s;
}
.mbar.show { transform: none; opacity: 1; visibility: visible; }
.menu-open .mbar { transform: translateY(calc(100% + 24px)); opacity: 0; visibility: hidden; }
.mbar-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.1; }
.mbar-info b { font-size: 19px; font-weight: 800; letter-spacing: -.03em; font-stretch: 120%; }
.mbar-info small { font-family: var(--mono); font-size: 11px; font-weight: 400; color: #9c9f92; margin-left: 2px; letter-spacing: 0; }
.mbar-info span { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #9c9f92; white-space: nowrap; }
.mbar .btn { height: 42px; flex: none; }
.mbar .btn:not(.ghost) { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.mbar .btn:not(.ghost):hover { background: var(--olive-2); border-color: var(--olive-2); color: var(--bg); }
.mbar .btn.ghost { color: var(--bg); border-color: #4a4e40; }
.mbar .btn.ghost:hover { border-color: var(--bg); }
@media (max-width: 359px) { .mbar-info span { display: none; } .mbar { padding-left: 12px; } .mbar .btn { padding: 0 11px; } }
@media (min-width: 1080px) { .mbar { display: none; } }
@media (max-width: 1079px) { .has-mbar .site-footer { padding-bottom: 96px; } }

/* índice em fita (substitui o índice lateral) */
.toc-strip {
  position: sticky; top: var(--header-h); z-index: 30;
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(-1 * var(--gutter)); padding: 10px var(--gutter);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: top .4s var(--ease);
}
.toc-strip::-webkit-scrollbar { display: none; }
.hdr-hidden .toc-strip { top: 0; }
.toc-strip a {
  flex: none; height: 34px; display: inline-flex; align-items: center; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: 999px; text-decoration: none;
  font-size: 14px; font-weight: 500; color: var(--ink-2); white-space: nowrap; transition: all .2s;
}
.toc-strip a.active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
@media (min-width: 1000px) { .toc-strip { display: none; } }
@media (max-width: 999px) { .with-toc { gap: 32px; } html:has(.toc-strip) { scroll-padding-top: calc(var(--header-h) + 72px); } }

/* ritmo mais compacto em ecrãs pequenos */
@media (max-width: 599px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .section.tight { padding: 44px 0; }
  .section-head { gap: 14px; margin-bottom: 32px; }
  .page-hero { padding: calc(var(--header-h) + 40px) 0 40px; }
  .page-hero .h1 { margin: 16px 0 18px; }
  .card { padding: 20px; }
  .accordion summary { padding: 18px 40px 18px 0; }
  .doc { gap: 14px; padding: 14px 2px; }
  .doc .ext { width: 36px; height: 44px; }
  .row .btn { flex: 1 1 auto; }
  /* rodapé em 2 colunas */
  .footer-top { grid-template-columns: 1fr 1fr; gap: 36px 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-top > div:last-child { grid-column: 1 / -1; }
  .footer-big { margin: 48px 0 20px; }
}
.btn:not([href]):not(button) { cursor: default; }
