/* =========================================================================
   Canal de Comunicação Confidencial — sistema visual
   Identidade da Correia Cacho & Associados: o vermelho institucional e o
   cinzento do logótipo, com tipos de letra alojados no próprio servidor
   (sem serviços externos). Contrastes verificados (WCAG 2.1 AA).
   ========================================================================= */

/* ---------- Tipos de letra (SIL Open Font License, ver /fonts/OFL.txt) ---------- */
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin-wght-normal.woff2") format("woff2-variations"),
       url("/fonts/source-sans-3-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: "Source Sans 3";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin-wght-italic.woff2") format("woff2-variations"),
       url("/fonts/source-sans-3-latin-wght-italic.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: "Oswald";
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url("/fonts/oswald-latin-wght-normal.woff2") format("woff2-variations"),
       url("/fonts/oswald-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;
}

:root {
  /* Marca CCA */
  --brand: #ab3738;            /* vermelho institucional (fundo do logótipo) */
  --brand-strong: #962f30;     /* texto e ligações sobre fundos claros */
  --brand-hover: #852829;
  --brand-deep: #8f2b2c;       /* zonas escuras das faixas vermelhas */
  --brand-accent: #b95e5d;     /* vermelho do símbolo: só elementos gráficos */
  --brand-soft: #fbf2f2;
  --brand-soft-line: #efd4d4;
  --brand-gray: #898987;       /* cinzento do logótipo: só elementos gráficos */
  --ink: #252524;              /* rodapé e barra lateral do painel */
  --ink-2: #333331;
  --brand-ui: #ab3738;         /* numerais, ícones e marcadores da marca */
  --brand-text: #4d2425;       /* texto sobre fundo suave da marca */
  --hero-bg: linear-gradient(120deg, #b33d3e 0%, #ab3738 42%, #8f2b2c 100%);
  --footer-bg: #252524;

  /* Neutros */
  --bg: #f4f4f2;
  --surface: #ffffff;
  --surface-muted: #f8f8f6;
  --text: #232322;
  --text-muted: #555553;
  --text-subtle: #5f5f5c;
  --line: #e2e2de;
  --line-strong: #8d8d89;
  --input-bg: #ffffff;
  --placeholder: #6f6f6b;
  --neutral-bg: #f1f1ee;
  --neutral-text: #474745;
  --neutral-line: #dededa;

  /* Estados */
  --success: #1e6b3c;
  --success-bg: #eaf5ee;
  --success-line: #bfe0cb;
  --warning: #7a4a00;
  --warning-bg: #fff4e0;
  --warning-line: #f2d59c;
  --danger: #9f2a22;
  --danger-bg: #fcedeb;
  --danger-line: #f1c4bf;
  --info: #1f4f8a;
  --info-bg: #edf3fb;
  --info-line: #c5d6ee;
  --info-text: #18375f;
  --success-text: #16452a;
  --warning-text: #5c3800;
  --danger-text: #6f1d17;
  --focus: #1f4f8a;
  --focus-ring: rgba(31, 79, 138, 0.22);
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23962f30' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");

  color-scheme: light;

  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 2px rgba(37, 37, 36, 0.05);
  --shadow: 0 1px 2px rgba(37, 37, 36, 0.04), 0 8px 24px rgba(37, 37, 36, 0.07);
  --shadow-lg: 0 2px 6px rgba(37, 37, 36, 0.06), 0 18px 40px rgba(37, 37, 36, 0.12);

  --font: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Oswald", "Arial Narrow", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Consolas, "Liberation Mono", monospace;
}

/* ---------- Modo noturno (mantém o vermelho institucional) ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand-strong: #f08d8b;
  --brand-hover: #f6aaa8;
  --brand-soft: #34201f;
  --brand-soft-line: #5a302f;
  --brand-ui: #e46f6d;
  --brand-text: #f3d3d2;
  --hero-bg: linear-gradient(120deg, #a03536 0%, #8f2b2c 45%, #6f2122 100%);
  --footer-bg: #0e0e0d;

  --bg: #151514;
  --surface: #1e1e1d;
  --surface-muted: #252524;
  --text: #ecebe6;
  --text-muted: #bdbcb5;
  --text-subtle: #a9a8a1;
  --line: #363634;
  --line-strong: #85847d;
  --input-bg: #181817;
  --placeholder: #94938c;
  --neutral-bg: #2c2c2a;
  --neutral-text: #d4d3cd;
  --neutral-line: #44443f;

  --success: #79cf98;
  --success-bg: #14291b;
  --success-line: #2b5a3a;
  --success-text: #bfe8cd;
  --warning: #f0b55a;
  --warning-bg: #2d2311;
  --warning-line: #6a4f1d;
  --warning-text: #f5dcae;
  --danger: #ff8f84;
  --danger-bg: #331a17;
  --danger-line: #6e2f29;
  --danger-text: #ffc9c2;
  --info: #8db7ef;
  --info-bg: #15233a;
  --info-line: #2c4a75;
  --info-text: #cfe0f8;
  --focus: #8ab4f8;
  --focus-ring: rgba(138, 180, 248, 0.3);
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23f08d8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.4), 0 18px 40px rgba(0, 0, 0, 0.45);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body > main { flex: 1 0 auto; }

img, svg { display: block; max-width: 100%; }
svg { flex-shrink: 0; }
[hidden] { display: none !important; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.btn[data-icon], .site-nav [data-icon] { display: inline-flex; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; color: var(--text); }
h1, h2 { font-family: var(--font-display); font-weight: 500; letter-spacing: 0.005em; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.7rem); color: var(--brand-strong); }
h2 { font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.9rem); }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
strong { font-weight: 700; }

a { color: var(--brand-strong); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-hover); text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--surface); color: var(--brand-strong); padding: 10px 16px;
  border-radius: var(--radius); box-shadow: var(--shadow); font-weight: 700;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 880px; }

.eyebrow {
  display: flex; align-items: center; gap: 12px; margin: 0 0 14px;
  font-family: var(--font-display); font-size: 0.85rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--brand-strong);
}
.eyebrow::before { content: ""; width: 32px; height: 2px; background: currentColor; flex-shrink: 0; }
.lead { font-size: 1.15rem; color: var(--text-muted); max-width: 720px; }

/* ---------- Cabeçalho ---------- */
.site-header { background: var(--surface); border-top: 4px solid var(--brand); box-shadow: 0 1px 0 var(--line); position: relative; z-index: 10; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; min-height: 88px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); padding: 14px 0; }
.brand img { height: 58px; width: auto; }
.brand .logo-dark { display: none; }
.brand-text { display: none; flex-direction: column; line-height: 1.15; }
.brand.no-logo .brand-text { display: flex; }
.brand-name { font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; color: var(--brand-strong); letter-spacing: 0.02em; text-transform: uppercase; }
.brand-tagline { font-size: 0.85rem; color: var(--text-muted); }
.brand:hover { color: var(--text); }

.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a {
  position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px;
  color: var(--text-muted); font-weight: 600; font-size: 1rem; text-decoration: none; border-radius: var(--radius-sm);
}
.site-nav a:hover { color: var(--brand-strong); background: var(--surface-muted); }
.site-nav a[aria-current="page"] { color: var(--brand-strong); }
.site-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 3px; border-radius: 2px; background: var(--brand);
}

/* Idioma e tema */
.header-tools { display: flex; align-items: center; gap: 10px; }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.lang-switch a {
  display: inline-flex; align-items: center; justify-content: center; min-width: 42px; min-height: 38px; padding: 0 10px;
  font-family: var(--font-display); font-weight: 500; font-size: 0.9rem; letter-spacing: 0.08em; color: var(--text-muted); text-decoration: none;
}
.lang-switch a + a { border-left: 1px solid var(--line); }
.lang-switch a:hover { color: var(--brand-strong); background: var(--surface-muted); }
.lang-switch a[aria-current="true"] { background: var(--brand); color: #fff; }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0;
  border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text-muted); cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.theme-toggle:hover { color: var(--brand-strong); border-color: var(--line-strong); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: inline-flex; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .brand:has(.logo-dark) .logo-light { display: none; }
:root[data-theme="dark"] .brand .logo-dark { display: block; }

/* ---------- Faixas na cor da marca ---------- */
.hero-brand, .page-hero {
  position: relative; overflow: hidden; color: #fff;
  background: var(--hero-bg);
}
.hero-brand::after, .page-hero::after {
  content: ""; position: absolute; pointer-events: none;
  top: 50%; right: max(-120px, calc(50% - 700px)); width: 560px; height: 362px; transform: translateY(-50%);
  background: url("/assets/simbolo-branco.png") no-repeat center / contain; opacity: 0.08;
}
.hero-brand .container, .page-hero .container { position: relative; z-index: 1; }
.hero-brand :focus-visible, .page-hero :focus-visible { outline-color: #fff; }
.hero-brand .eyebrow, .page-hero .eyebrow { color: rgba(255, 255, 255, 0.92); }
.hero-brand h1, .page-hero h1 { color: #fff; text-transform: uppercase; letter-spacing: 0.01em; }
.hero-brand a:not(.btn), .page-hero a:not(.btn) { color: #fff; }

.hero-brand { padding: 76px 0 132px; }
.hero-brand h1 { font-size: clamp(2.2rem, 1.3rem + 3.4vw, 3.6rem); line-height: 1.06; max-width: 15ch; margin-bottom: 0; }
.hero-rule { width: 72px; height: 3px; border: 0; background: #fff; margin: 26px 0; }
.hero-brand .lead { color: rgba(255, 255, 255, 0.9); font-size: 1.22rem; max-width: 640px; margin-bottom: 0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }

.page-hero { padding: 56px 0 60px; }
.page-hero h1 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.8rem); line-height: 1.1; margin-bottom: 0; }
.page-hero .lead { color: rgba(255, 255, 255, 0.9); margin: 18px 0 0; }
.page-hero .hero-rule { margin: 20px 0 0; }

/* Garantias por baixo da faixa principal */
.trust-band { position: relative; z-index: 2; margin-top: -76px; }
.trust {
  list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
}
.trust li { display: flex; gap: 16px; align-items: flex-start; padding: 28px 28px 26px; border-left: 1px solid var(--line); }
.trust li:first-child { border-left: 0; }
.trust .icon-badge { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ui); }
.trust strong { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; letter-spacing: 0.01em; margin-bottom: 4px; }
.trust li > div > span { display: block; color: var(--text-muted); font-size: 0.97rem; line-height: 1.5; }

/* ---------- Secções ---------- */
.section { padding: 72px 0; }
.section-tight { padding-top: 40px; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head h2 { margin-bottom: 10px; }
.section-head p { color: var(--text-muted); font-size: 1.1rem; margin: 0; }
.section-title { font-size: 1.35rem; margin-bottom: 14px; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.steps li { counter-increment: step; position: relative; padding: 30px 28px 4px 0; }
.steps li::after { content: ""; position: absolute; top: -1px; left: 0; width: 48px; height: 3px; background: var(--brand-ui); }
.steps li::before {
  content: counter(step, decimal-leading-zero); display: block; margin-bottom: 14px;
  font-family: var(--font-display); font-size: 2.6rem; font-weight: 400; line-height: 1; color: var(--brand-ui);
}
.steps strong { display: block; font-size: 1.12rem; margin-bottom: 6px; }
.steps p { margin: 0; color: var(--text-muted); font-size: 1rem; }

/* ---------- Formulário com coluna lateral ---------- */
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; grid-template-rows: auto 1fr; gap: 16px 32px; }
.form-main { grid-column: 1; grid-row: 1 / span 2; min-width: 0; }
.form-aside { display: grid; gap: 16px; align-content: start; }
.form-aside-top { grid-column: 2; grid-row: 1; }
.form-aside-bottom { grid-column: 2; grid-row: 2; align-self: start; position: sticky; top: 24px; }
.aside-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 22px 20px; }
.aside-card h3 { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 500; font-size: 1.18rem; letter-spacing: 0.01em; margin-bottom: 12px; }
.aside-card h3 [data-icon] { color: var(--brand-ui); }
.aside-card p { color: var(--text-muted); font-size: 0.97rem; }
.aside-card p:last-child { margin-bottom: 0; }
.aside-card ul { margin: 0; padding-left: 18px; color: var(--text-muted); font-size: 0.97rem; }
.aside-card li { margin: 8px 0; }
.aside-card li::marker { color: var(--brand-ui); }
.aside-card.is-brand { background: var(--brand-soft); border-color: var(--brand-soft-line); }
.aside-card.is-brand ul, .aside-card.is-brand p { color: var(--brand-text); }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.facts li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: baseline; margin: 0; }
.fact-value { font-family: var(--font-display); font-size: 1.55rem; font-weight: 500; line-height: 1.1; color: var(--brand-ui); white-space: nowrap; }
.fact-label { color: var(--text-muted); font-size: 0.95rem; line-height: 1.4; }

/* ---------- Cartões e alertas ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card-accent { border-top: 4px solid var(--brand); }
.card-body { padding: 36px 40px 40px; }
.card-intro { color: var(--text-muted); margin: -2px 0 24px; }

.callout { display: flex; gap: 12px; border: 1px solid; border-left-width: 4px; border-radius: var(--radius); padding: 14px 16px; margin: 0 0 16px; font-size: 0.98rem; }
.callout > svg, .callout > [data-icon] { margin-top: 2px; align-self: flex-start; }
.callout > [data-icon] svg { color: inherit; }
.callout-info > [data-icon] { color: var(--info); }
.callout-success > [data-icon] { color: var(--success); }
.callout-warning > [data-icon] { color: var(--warning); }
.callout-danger > [data-icon] { color: var(--danger); }
.callout-brand > [data-icon] { color: var(--brand-strong); }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout ul { margin: 6px 0 0; padding-left: 20px; }
.callout li { margin: 3px 0; }
.callout-title { font-weight: 700; display: block; margin-bottom: 2px; }
.callout-info { background: var(--info-bg); border-color: var(--info-line); border-left-color: var(--info); color: var(--info-text); }
.callout-info > svg { color: var(--info); }
.callout-success { background: var(--success-bg); border-color: var(--success-line); border-left-color: var(--success); color: var(--success-text); }
.callout-success > svg { color: var(--success); }
.callout-warning { background: var(--warning-bg); border-color: var(--warning-line); border-left-color: #b07a1c; color: var(--warning-text); }
.callout-warning > svg { color: var(--warning); }
.callout-danger { background: var(--danger-bg); border-color: var(--danger-line); border-left-color: var(--danger); color: var(--danger-text); }
.callout-danger > svg { color: var(--danger); }
.callout-brand { background: var(--brand-soft); border-color: var(--brand-soft-line); border-left-color: var(--brand); color: var(--brand-text); }
.callout-brand > svg { color: var(--brand-strong); }

/* ---------- Formulários ---------- */
.form-section { border: 0; margin: 0; padding: 30px 0 8px; border-top: 1px solid var(--line); min-width: 0; }
.form-section:first-of-type { border-top: 0; padding-top: 4px; }
.form-section > legend, .form-section-title {
  display: flex; align-items: center; gap: 12px; padding: 0; margin-bottom: 18px; float: left; width: 100%;
  font-family: var(--font-display); font-size: 1.32rem; font-weight: 500; letter-spacing: 0.01em; color: var(--text);
}
.form-section > legend .optional { font-family: var(--font); font-size: 1rem; letter-spacing: 0; }
.form-section > legend + * { clear: both; }
.section-number {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: var(--brand); color: #fff; font-family: var(--font-display); font-size: 1rem; font-weight: 500; flex-shrink: 0;
}
.section-intro { color: var(--text-muted); margin-top: -6px; font-size: 0.98rem; clear: both; }

.field { margin-bottom: 22px; }
.field:last-child { margin-bottom: 8px; }
fieldset.field { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
fieldset.field > legend { padding: 0; margin-bottom: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }

label, .label { display: block; font-weight: 600; margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--text-muted); }
.required-mark { color: var(--danger); }
.hint { display: block; color: var(--text-muted); font-size: 0.94rem; margin: -2px 0 8px; }

input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"],
select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--input-bg);
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 10px 12px; min-height: 46px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input[type="text"]:hover, input[type="email"]:hover, input[type="password"]:hover, input[type="search"]:hover, select:hover, textarea:hover { border-color: var(--text-subtle); }
textarea { min-height: 150px; resize: vertical; line-height: 1.55; }
select {
  appearance: none; padding-right: 40px; cursor: pointer;
  background-image: var(--select-arrow);
  background-repeat: no-repeat; background-position: right 12px center;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--focus-ring); }
::placeholder { color: var(--placeholder); opacity: 1; }

.field.has-error input, .field.has-error select, .field.has-error textarea, .field.has-error .dropzone { border-color: var(--danger); border-width: 2px; }
.field-error { display: flex; gap: 6px; align-items: flex-start; color: var(--danger); font-weight: 600; font-size: 0.94rem; margin: 0 0 8px; }
.field-error svg { margin-top: 3px; }

.counter { display: block; text-align: right; font-size: 0.88rem; color: var(--text-muted); margin-top: 4px; }
.counter.is-short { color: var(--warning); }

.choice-list { display: grid; gap: 8px; }
.choice { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 0; cursor: pointer; padding: 4px 0; }
.choice input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--brand); flex-shrink: 0; }
.choice-inline { display: flex; flex-wrap: wrap; gap: 8px 26px; }

.option-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.option-card { position: relative; display: block; margin: 0; cursor: pointer; font-weight: 400; }
.option-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option-card .option-body {
  display: flex; gap: 16px; height: 100%; padding: 22px 20px; border: 2px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.option-card .option-icon { color: var(--brand-ui); background: var(--brand-soft); border-radius: var(--radius); padding: 10px; height: fit-content; }
.option-card strong { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.2rem; letter-spacing: 0.01em; margin-bottom: 4px; }
.option-card span.desc { color: var(--text-muted); font-size: 0.96rem; line-height: 1.5; }
.option-card:hover .option-body { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.option-card input:checked + .option-body { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand) inset; }
.option-card input:focus-visible + .option-body { outline: 3px solid var(--focus); outline-offset: 2px; }
.option-check { margin-left: auto; color: var(--brand-ui); opacity: 0; transition: opacity 0.15s; }
.option-card input:checked + .option-body .option-check { opacity: 1; }

.conditional { border-left: 3px solid var(--brand-soft-line); padding-left: 16px; margin: 10px 0 4px 10px; }

/* Anexos */
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: 6px; border: 2px dashed var(--line-strong); border-radius: var(--radius-lg); padding: 30px 16px; background: var(--surface-muted);
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover { border-color: var(--brand); }
.dropzone.is-dragover { border-color: var(--brand); background: var(--brand-soft); }
.dropzone svg { color: var(--brand-ui); }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone input[type="file"]:focus-visible + .dropzone-label { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
.dropzone-label strong { color: var(--brand-strong); text-decoration: underline; }
.dropzone-meta { font-size: 0.9rem; color: var(--text-muted); }

.file-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.file-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.file-item svg { color: var(--text-muted); }
.file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file-size { color: var(--text-muted); font-size: 0.9rem; white-space: nowrap; }
.file-item.is-invalid { border-color: var(--danger-line); background: var(--danger-bg); }
.file-item.is-invalid .file-size { color: var(--danger); font-weight: 600; }

/* Verificação anti-spam */
.challenge { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--surface-muted); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 16px; }
.challenge label { margin: 0; }
.challenge input { width: 96px; text-align: center; font-size: 1.1rem; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 22px;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2; letter-spacing: 0.01em; border-radius: var(--radius); border: 2px solid transparent;
  cursor: pointer; text-decoration: none; transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--brand-strong); border-color: var(--brand); }
.btn-secondary:hover { background: var(--brand-soft); color: var(--brand-hover); }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-muted); color: var(--text); border-color: var(--line-strong); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: var(--danger-line); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-light { background: #fff; color: #962f30; }
.btn-light:hover { background: #f6e8e8; color: #852829; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.78); }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: #fff; }
.btn-lg { min-height: 54px; padding: 12px 30px; font-size: 1.06rem; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 0.92rem; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; padding: 0; min-height: 0; color: var(--brand-strong); font-weight: 600; text-decoration: underline; cursor: pointer; font: inherit; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; }
.btn-icon { padding: 8px; min-height: 36px; min-width: 36px; }
.btn .spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.submit-area { margin-top: 18px; padding-top: 24px; border-top: 1px solid var(--line); }
.submit-note { color: var(--text-muted); font-size: 0.92rem; margin: 12px 0 0; }

/* ---------- Resumo de erros ---------- */
.error-summary { border: 2px solid var(--danger); border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: 24px; background: var(--danger-bg); }
.error-summary h2 { font-family: var(--font); font-weight: 700; font-size: 1.1rem; color: var(--danger); display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.error-summary ul { margin: 0; padding-left: 20px; }
.error-summary a { color: var(--danger); font-weight: 600; }

/* ---------- Ecrã de sucesso ---------- */
.success-head { text-align: center; padding: 8px 0 18px; }
.success-icon { display: inline-flex; color: var(--success); background: var(--success-bg); border-radius: 50%; padding: 14px; margin-bottom: 12px; }
.success-head h2 { font-size: 2rem; color: var(--text); }
.success-head p { color: var(--text-muted); }

.code-box { border: 2px solid var(--brand); border-radius: var(--radius-lg); background: var(--brand-soft); padding: 24px; text-align: center; margin: 8px 0 18px; }
.code-label { font-family: var(--font-display); font-weight: 500; color: var(--brand-strong); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.9rem; }
.code-value { font-family: var(--mono); font-size: clamp(1.4rem, 1rem + 2.4vw, 2.1rem); font-weight: 700; letter-spacing: 0.06em; color: var(--text); margin: 8px 0 14px; word-break: break-all; user-select: all; }
.code-meta { color: var(--text-muted); font-size: 0.94rem; margin-top: 12px; }

.next-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.next-steps li { display: flex; gap: 12px; align-items: flex-start; }
.next-steps svg { color: var(--brand-ui); margin-top: 3px; }

/* ---------- Acompanhamento ---------- */
.lookup-intro { text-align: center; max-width: 560px; margin: 0 auto 22px; }
.lookup-intro .lookup-icon { color: var(--brand-ui); background: var(--brand-soft); border-radius: 50%; padding: 14px; margin-bottom: 14px; }
.lookup-intro h2 { margin-bottom: 6px; }
.lookup-intro p { color: var(--text-muted); margin: 0; }
.lookup-form, #lookup-notice, #lookup-view > .callout { max-width: 560px; margin-left: auto; margin-right: auto; }
.lookup-form { margin-bottom: 22px; }
.lookup-form .btn { width: 100%; }
.code-input { font-family: var(--mono); font-size: 1.3rem !important; letter-spacing: 0.08em; text-transform: uppercase; text-align: center; min-height: 54px !important; }

.case-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.case-head h2 { margin-bottom: 4px; }
.case-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--text-muted); font-size: 0.94rem; margin: 0; padding: 0; list-style: none; }
.case-meta li + li::before { content: "·"; margin-right: 12px; color: var(--line-strong); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 0.86rem; font-weight: 700; border: 1px solid; white-space: nowrap; }
.badge-neutral { background: var(--neutral-bg); color: var(--neutral-text); border-color: var(--neutral-line); }
.badge-info { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.badge-success { background: var(--success-bg); color: var(--success); border-color: var(--success-line); }
.badge-warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-line); }
.badge-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.badge-brand { background: var(--brand-soft); color: var(--brand-strong); border-color: var(--brand-soft-line); }

.progress { list-style: none; display: flex; padding: 0; margin: 24px 0; counter-reset: p; }
.progress li { flex: 1; position: relative; text-align: center; font-size: 0.88rem; color: var(--text-muted); padding-top: 34px; }
.progress li::before {
  content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--line-strong); z-index: 1;
}
.progress li::after { content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 3px; background: var(--line); }
.progress li:first-child::after { display: none; }
.progress li.done::before { background: var(--success); border-color: var(--success); }
.progress li.done::after, .progress li.current::after { background: var(--success); }
.progress li.current::before { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft-line); }
.progress li.current { color: var(--text); font-weight: 700; }

.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0 0 8px; }
.info-tile { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--surface-muted); }
.info-tile dt { font-size: 0.88rem; color: var(--text-muted); font-weight: 600; }
.info-tile dd { margin: 2px 0 0; font-weight: 700; }

.thread { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.msg { max-width: 86%; }
.msg-body { border-radius: 10px; padding: 12px 14px; border: 1px solid var(--line); background: var(--surface); white-space: pre-wrap; word-wrap: break-word; }
.msg-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.msg-own { justify-self: end; }
.msg-own .msg-body { background: var(--brand-soft); border-color: var(--brand-soft-line); border-bottom-right-radius: 3px; }
.msg-own .msg-meta { justify-content: flex-end; }
.msg-team .msg-body { border-bottom-left-radius: 3px; }
.msg-system { justify-self: center; max-width: 92%; text-align: center; }
.msg-system .msg-body { background: transparent; border: 0; color: var(--text-muted); font-size: 0.92rem; padding: 2px 8px; }
.msg-files { list-style: none; padding: 0; margin: 8px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.msg-files li { display: inline-flex; align-items: center; gap: 6px; font-size: 0.87rem; padding: 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }

.details { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.details > summary { cursor: pointer; padding: 14px 16px; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 8px; }
.details > summary::-webkit-details-marker { display: none; }
.details > summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--brand-ui); border-bottom: 2px solid var(--brand-ui); transform: rotate(-45deg); transition: transform 0.15s; margin-right: 4px; }
.details[open] > summary::before { transform: rotate(45deg); }
.details-body { padding: 0 16px 16px; }

.kv { display: grid; grid-template-columns: minmax(160px, 34%) 1fr; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--text-muted); font-weight: 600; font-size: 0.94rem; }
.kv dd { margin: 0; white-space: pre-wrap; word-wrap: break-word; }
.prose-box { white-space: pre-wrap; word-wrap: break-word; background: var(--surface-muted); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 14px; }

.session-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 0.92rem; color: var(--text-muted); background: var(--surface-muted); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 10px 14px; margin-bottom: 20px; }
.session-info { display: inline-flex; align-items: center; gap: 8px; }
.thread-title { margin-top: 28px; }
.submit-area .choice { margin-bottom: 14px; }

/* ---------- Página «Como funciona» ---------- */
.policy-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 56px; align-items: start; padding-top: 56px; padding-bottom: 72px; }
.toc { position: sticky; top: 24px; border-left: 2px solid var(--line); padding: 2px 0 2px 18px; }
.toc > strong { display: block; font-family: var(--font-display); font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; margin: 0; }
.toc a { display: flex; gap: 10px; padding: 6px 0; color: var(--text-muted); text-decoration: none; font-size: 0.97rem; line-height: 1.35; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--font-display); color: var(--brand-ui); min-width: 22px; }
.toc a:hover { color: var(--brand-strong); }

.prose { max-width: 760px; }
.prose > section { padding-bottom: 8px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.prose > section:last-of-type { border-bottom: 0; }
.prose h2 { display: flex; align-items: baseline; gap: 14px; margin: 0 0 14px; font-size: 1.6rem; color: var(--text); }
.prose h2 .num { font-family: var(--font-display); color: var(--brand-ui); font-size: 1.1rem; min-width: 26px; }
.prose ul { padding-left: 22px; }
.prose li { margin: 8px 0; }
.prose li::marker { color: var(--brand-ui); }

.key-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 4px 0 20px; }
.key-fact { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--brand-ui); border-radius: var(--radius); padding: 16px 16px 14px; }
.key-fact-value { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.9rem; line-height: 1.1; color: var(--brand-ui); }
.key-fact-label { display: block; margin-top: 4px; color: var(--text-muted); font-size: 0.94rem; line-height: 1.4; }

.cta-band { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px 28px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 4px; font-size: 1.4rem; }
.cta-band p { margin: 0; color: var(--text-muted); }

/* ---------- Rodapé ---------- */
.site-footer { background: var(--footer-bg); color: #d6d6d1; font-size: 0.97rem; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.1fr 1.25fr 0.9fr 1fr; gap: 40px; padding-top: 52px; padding-bottom: 40px; }
.footer-brand img { height: 54px; width: auto; margin-bottom: 18px; }
.footer-brand p { margin: 0 0 6px; }
.site-footer h2 { font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.16em; color: #fff; margin: 4px 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: #fff; text-decoration-color: rgba(255, 255, 255, 0.45); }
.site-footer a:hover { color: #fff; text-decoration-color: #fff; }
.site-footer strong { color: #fff; }
.site-footer :focus-visible { outline-color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 18px 0 22px; font-size: 0.9rem; color: #a9a9a4; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; }
.footer-bottom a { color: #d6d6d1; }

/* Contactos gerais da organização (rodapé e política) */
.contact-list { font-style: normal; display: grid; gap: 12px; margin: 0; }
.contact-row { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; align-items: start; margin: 0; line-height: 1.6; }
.contact-icon { display: inline-flex; padding-top: 3px; color: var(--brand-ui); }
.contact-row a { overflow-wrap: anywhere; }
.site-footer .contact-icon { color: #e46f6d; }
.contact-note { margin: 16px 0 0; font-size: 0.9rem; line-height: 1.5; color: #a9a9a4; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand-ui); border-radius: var(--radius); padding: 20px 22px; margin: 4px 0 16px; }
.contact-card .contact-list { gap: 14px; }
.contact-card .contact-row a { color: var(--brand-strong); }

.noscript { margin: 20px 0; }
.mono { font-family: var(--mono); letter-spacing: 0.02em; }
.field .callout { margin: 10px 0 0; }
.file-trigger label.btn { display: inline-flex; margin-bottom: 6px; }
.file-trigger input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.reply-form .actions { margin-top: 4px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1040px) {
  .form-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .form-aside-top { grid-column: 1; grid-row: 1; }
  .form-main { grid-column: 1; grid-row: 2; }
  .form-aside-bottom { grid-column: 1; grid-row: 3; position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .policy-layout { grid-template-columns: 1fr; gap: 28px; }
  .toc { position: static; }
  .toc ol { columns: 2; column-gap: 32px; }
  .toc li { break-inside: avoid; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px 40px; }
}
@media (max-width: 860px) {
  .trust { grid-template-columns: 1fr; }
  .trust li { border-left: 0; border-top: 1px solid var(--line); padding: 20px 22px; }
  .trust li:first-child { border-top: 0; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 8px; }
  .key-facts { grid-template-columns: 1fr; }
  .hero-brand::after, .page-hero::after { opacity: 0.06; right: -180px; }
}
@media (max-width: 820px) {
  .site-header .container { gap: 0 12px; }
  .header-tools { order: 2; margin-left: auto; }
  .site-nav { order: 3; width: 100%; margin-left: -14px; padding-bottom: 6px; }
}
@media (max-width: 640px) {
  body { font-size: 1.03rem; }
  .container { padding: 0 16px; }
  .site-header .container { min-height: 64px; gap: 4px 16px; }
  .brand { padding: 12px 0 6px; }
  .brand img { height: 44px; }
  .site-nav { margin-left: -8px; margin-right: -8px; width: calc(100% + 16px); }
  .site-nav ul { justify-content: space-between; flex-wrap: nowrap; }
  .lang-switch a { min-width: 38px; min-height: 36px; padding: 0 8px; }
  .theme-toggle { width: 38px; height: 38px; }
  .site-nav a { padding: 8px; font-size: 0.97rem; }
  .site-nav a[aria-current="page"]::after { left: 8px; right: 8px; }
  .hero-brand { padding: 44px 0 104px; }
  .hero-brand .lead { font-size: 1.08rem; }
  .hero-actions .btn { width: 100%; }
  .hero-brand::after, .page-hero::after { display: none; }
  .page-hero { padding: 36px 0 40px; }
  .trust-band { margin-top: -64px; }
  .section { padding: 52px 0; }
  .steps, .option-cards, .grid-2, .info-grid { grid-template-columns: 1fr; }
  .steps li { padding: 22px 0 6px; }
  .steps li::before { font-size: 2.1rem; margin-bottom: 8px; }
  .form-aside-bottom { grid-template-columns: 1fr; }
  .card-body { padding: 24px 18px 28px; }
  .msg { max-width: 100%; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .toc ol { columns: 1; }
  .progress li { font-size: 0.76rem; }
  .btn-lg { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; }
  .policy-layout { padding-top: 32px; padding-bottom: 52px; }
  .prose h2 { font-size: 1.4rem; }
  .cta-band .actions, .cta-band .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .site-header nav, .site-footer, .actions, .btn, .hero-actions, .form-aside, .toc { display: none !important; }
  body { background: #fff; display: block; }
  .hero-brand, .page-hero { background: #fff; color: var(--text); padding: 16px 0; }
  .hero-brand h1, .page-hero h1 { color: var(--brand-strong); }
  .hero-brand::after, .page-hero::after { display: none; }
  .card { box-shadow: none; border: 0; }
}
