/* =========================================================
   Atypical Tech — Design Tokens (HSL) + base utilities
   Spec: LAYOUT_GUIDE.md
   ========================================================= */

/* ---------------------------------------------------------
   Inter, servido por nós.

   Vinha do Google Fonts como <link> no <head>, e uma folha de estilo de
   terceiros bloqueia o render: o browser tinha de resolver DNS, negociar TLS e
   descarregar o CSS noutro domínio antes de pintar o primeiro pixel. Media-se
   nos números: o FCP era 2,84–2,89 s nas cinco páginas medidas, praticamente
   igual independentemente do conteúdo — um custo que não vinha da página.

   O ficheiro é o mesmo para os quatro pesos porque o Inter é hoje uma fonte
   variável. Daí `font-weight: 100 900`: um só woff2 por subconjunto cobre o
   400, o 500, o 600 e o 700, e são 133 KB em vez dos 534 KB que quatro cópias
   do mesmo ficheiro custariam.

   `swap` para que o texto apareça imediatamente na fonte do sistema e troque
   quando o Inter chegar — nunca há um período de texto invisível.
   --------------------------------------------------------- */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin-ext.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;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin.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 {
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --card: 0 0% 100%;
  --card-foreground: 222.2 84% 4.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 222.2 84% 4.9%;
  --primary: 222.2 47.4% 11.2%;
  --primary-foreground: 210 40% 98%;
  --secondary: 210 40% 96.1%;
  --secondary-foreground: 222.2 47.4% 11.2%;
  --muted: 210 40% 96.1%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --accent: 210 40% 96.1%;
  --accent-foreground: 222.2 47.4% 11.2%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;
  --border: 214.3 31.8% 91.4%;
  --input: 214.3 31.8% 91.4%;
  --ring: 222.2 84% 4.9%;
  --radius: 0.5rem;
}

.dark {
  --background: 222.2 84% 4.9%;
  --foreground: 210 40% 98%;
  --card: 222.2 84% 4.9%;
  --card-foreground: 210 40% 98%;
  --popover: 222.2 84% 4.9%;
  --popover-foreground: 210 40% 98%;
  --primary: 210 40% 98%;
  --primary-foreground: 222.2 47.4% 11.2%;
  --secondary: 217.2 32.6% 17.5%;
  --secondary-foreground: 210 40% 98%;
  --muted: 217.2 32.6% 17.5%;
  --muted-foreground: 215 20.2% 65.1%;
  --accent: 217.2 32.6% 17.5%;
  --accent-foreground: 210 40% 98%;
  --border: 217.2 32.6% 17.5%;
  --input: 217.2 32.6% 17.5%;
  --ring: 212.7 26.8% 83.9%;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* `<FocusOnNavigate Selector="h1">` no Routes.razor põe tabindex="-1" no título e foca-o,
   para que um leitor de ecrã anuncie a página nova. Com a home renderizada estaticamente
   isso passou a acontecer também no primeiro carregamento, e o Chromium desenhava um anel
   de foco azul à volta do <h1> — visível a cada visita.

   Só o anel é removido, não o foco: quem foi focado por código não chegou ali pelo teclado,
   então não precisa de ver onde está. Elementos realmente focáveis (tabindex >= 0, botões,
   links, campos) não são tocados por este seletor e mantêm o anel. */
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* Container */
.container-x {
  width: 100%;
  margin-inline: auto;
  padding-inline: 1rem;
  max-width: 1400px;
}
@media (min-width: 768px) { .container-x { padding-inline: 2rem; } }

/* Section */
.section { padding-block: 4rem; }
@media (min-width: 768px) { .section { padding-block: 6rem; } }
.section-muted { background: hsl(var(--muted) / 0.3); }
.section-title {
  font-size: 1.875rem; line-height: 1.2; font-weight: 700;
  text-align: center; margin: 0 0 3rem;
}
@media (min-width: 768px) { .section-title { font-size: 2.25rem; } }
.section-subtitle { color: hsl(var(--muted-foreground)); text-align: center; max-width: 42rem; margin: -2rem auto 3rem; }

/* Grid helpers */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.5rem 1rem; height: 2.25rem;
  border-radius: var(--radius); font-weight: 500; font-size: 0.875rem;
  transition: all 200ms;
  border: 1px solid transparent;
}
.btn:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }
.btn-primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.btn-primary:hover { background: hsl(var(--primary) / 0.9); }
.btn-outline { background: transparent; border-color: hsl(var(--border)); color: hsl(var(--foreground)); }
.btn-outline:hover { background: hsl(var(--accent)); }
.btn-ghost { background: transparent; color: hsl(var(--foreground)); }
.btn-ghost:hover { background: hsl(var(--accent)); }
.btn-lg { height: 3rem; padding: 0 2rem; font-size: 1.125rem; }
.btn-sm { height: 2rem; padding: 0 0.75rem; font-size: 0.8125rem; }
.btn-icon { width: 2.25rem; padding: 0; }
.btn-block { width: 100%; }

/* Cards */
.card-x {
  background: hsl(var(--card)); color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border)); border-radius: var(--radius);
}
.card-body { padding: 1.5rem; }
.card-hover { transition: all 300ms; }
.card-hover:hover {
  border-color: hsl(var(--primary) / 0.5);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  transform: translateY(-4px);
}

/* Inputs */
.input, .textarea, .select-x {
  display: block; width: 100%;
  background: transparent; color: hsl(var(--foreground));
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem; font-size: 0.875rem;
  transition: border-color 150ms, box-shadow 150ms;
}
.input:focus, .textarea:focus, .select-x:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}
.textarea { min-height: 6rem; resize: vertical; }
.label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.375rem; }

/* Badges */
.badge {
  display: inline-flex; align-items: center;
  padding: 0.125rem 0.625rem; border-radius: 9999px;
  background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground));
  font-size: 0.75rem; font-weight: 500;
}

/* ============= Header ============= */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: hsl(var(--background) / 0.95);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid hsl(var(--border));
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
@media (min-width: 768px) { .header-inner { height: 5rem; } }
.header-logo { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; color: hsl(var(--foreground)); display: inline-flex; align-items: center; }
.header-logo img { height: 40px; width: auto; display: block; }
.header-nav { display: none; gap: 0.25rem; align-items: center; }
@media (min-width: 1024px) { .header-nav { display: flex; } }
.header-nav button, .header-nav a.header-nav-link { color: hsl(var(--muted-foreground)); padding: 0.5rem 0.75rem; border-radius: var(--radius); font-size: 0.875rem; line-height: 1.25rem; }
.header-nav button:hover, .header-nav a.header-nav-link:hover { color: hsl(var(--foreground)); background: hsl(var(--accent)); }
.header-right { display: none; align-items: center; gap: 0.75rem; }
@media (min-width: 768px) { .header-right { display: flex; } }
.lang-flags { display: flex; gap: 0.25rem; align-items: center; }
/* Force a color-emoji font so flag glyphs render as pictures — without this,
   some browsers (notably Windows via 'Segoe UI') resolve the regional-indicator
   codepoints to plain letters instead of deferring to the OS emoji font. */
/* Each language is a real link now, so the rules have to cover <a> as well as <button>. */
.lang-flags a { font-size: 1.25rem; line-height: 1; opacity: 0.5; padding: 0.125rem 0.375rem; transition: opacity 150ms; font-family: "Segoe UI Emoji", "Noto Color Emoji", "Apple Color Emoji", sans-serif; text-decoration: none; }
.lang-flags a.active { opacity: 1; }
.lang-flags a.lang-ca { display: inline-flex; align-items: center; padding: 0.125rem 0.375rem; }
.lang-flags a.lang-ca img {
  height: 0.95rem; width: auto; display: block;
  border: 1px solid hsl(var(--border)); border-radius: 2px;
}
.theme-toggle { padding: 0.375rem; border-radius: var(--radius); color: hsl(var(--muted-foreground)); }
.theme-toggle:hover { color: hsl(var(--foreground)); background: hsl(var(--accent)); }
.menu-btn { display: inline-flex; padding: 0.5rem; border-radius: var(--radius); }
@media (min-width: 1024px) { .menu-btn { display: none; } }

.mobile-menu {
  display: flex; flex-direction: column;
  border-top: 1px solid hsl(var(--border));
  padding: 0.5rem 0;
}
.mobile-menu button, .mobile-menu > a { display: block; padding: 0.75rem 1rem; text-align: left; color: hsl(var(--foreground)); text-decoration: none; }
.mobile-menu button:hover, .mobile-menu > a:hover { background: hsl(var(--accent)); }
.mobile-menu .lang-row { display: flex; gap: 0.5rem; padding: 0.75rem 1rem; border-top: 1px solid hsl(var(--border)); }

/* ============= Hero ============= */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  position: relative; padding-top: 4rem; padding-bottom: 4rem;
  /* 1920x1072 JPEG a 58 KB, e não o PNG de 4.756 KB que estava aqui: o hero é a maior
     imagem do site e fica atrás de ::before com 80% de opacidade e blur de 4px, ou seja
     20% visível e desfocado. O alpha do PNG era peso morto — todos os pixels opacos. */
  background-image: url('img/hero-banner.jpg');
  background-size: cover; background-position: center;
}
@media (min-width: 768px) { .hero { padding-top: 5rem; } }
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: hsl(var(--background) / 0.8);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.hero-content { position: relative; text-align: center; max-width: 64rem; padding: 0 1rem; }
.hero h1 {
  font-size: 2.25rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
}
@media (min-width: 768px) { .hero h1 { font-size: 3rem; } }
@media (min-width: 1024px) { .hero h1 { font-size: 3.75rem; } }
.hero p {
  font-size: 1.125rem; color: hsl(var(--muted-foreground));
  max-width: 40rem; margin: 0 auto 2rem;
}
@media (min-width: 768px) { .hero p { font-size: 1.25rem; } }

/* ============= Partners ============= */
.partners-block { margin-bottom: 3rem; }
.partners-block h3 { text-align: center; color: hsl(var(--muted-foreground)); font-size: 0.875rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 1.5rem; }
.partners-single { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 2rem; }
.partners-single img { width: 420px; height: auto; }
/* The Celigo wordmark has no icon/padding — cap its height so its visual
   weight matches the neighbouring partner logos */
.partners-single img[alt="Celigo"] { width: auto; height: 3.5rem; }
/* Logos are fixed brand colours, and most of them are dark — on the dark theme Stacksync,
   Zone&Co, n8n, Embat and boomi all but disappeared. Inverting (which is what Celigo used
   to do here) only works for a pure black-or-white mark and wrecks a coloured one: blue
   comes out orange. So every logo sits on a light chip instead, which keeps each brand's
   real colours and is legible on either theme. Padding is inside the width because of the
   global border-box, so the tiles do not change size. */
.dark .partners-block img {
  background: hsl(0 0% 100%);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
}
.partner-tile {
  display: flex; align-items: center; justify-content: center;
  height: 4rem; background: hsl(var(--muted) / 0.5);
  border: 1px solid hsl(var(--border)); border-radius: var(--radius);
  font-weight: 500; font-size: 0.875rem; color: hsl(var(--muted-foreground));
  transition: border-color 200ms;
}
@media (min-width: 768px) { .partner-tile { height: 5rem; font-size: 1rem; } }
.partner-tile:hover { border-color: hsl(var(--primary) / 0.5); }

/* ============= Features ============= */
.feature-icon {
  width: 3.5rem; height: 3.5rem; border-radius: 9999px;
  background: hsl(var(--primary) / 0.1); color: hsl(var(--primary));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
}
.feature-icon svg { width: 1.75rem; height: 1.75rem; }
.feature-card { text-align: center; }
.feature-card h3 { font-size: 1.125rem; font-weight: 600; margin: 0 0 0.5rem; }
.feature-card p { font-size: 0.875rem; color: hsl(var(--muted-foreground)); margin: 0; }

/* ============= Features (alternating layout) ============= */
.features-mold .feature-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 4rem;
}
.features-mold .feature-item:last-child { margin-bottom: 0; }
@media (min-width: 768px) {
  .features-mold .feature-item {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
  .features-mold .feature-item:nth-child(even) .feature-content { order: 2; }
  .features-mold .feature-item:nth-child(even) .feature-images  { order: 1; }
}
.features-mold .feature-content h3 {
  font-size: 1.75rem; font-weight: 700; margin: 0 0 1rem;
  color: hsl(var(--primary));
}
.features-mold .feature-content p {
  font-size: 1.05rem; line-height: 1.8;
  color: hsl(var(--muted-foreground)); margin: 0;
}
.features-mold .feature-images {
  display: flex; gap: 1rem; flex-wrap: wrap;
}
.features-mold .feature-images img {
  width: 100%;
  border-radius: 0.75rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  display: block;
}
.features-mold .feature-images img:not(:only-child) {
  width: calc(50% - 0.5rem);
}

/* ============= Solutions carousel ============= */
.solutions-wrap { max-width: 56rem; margin: 0 auto; position: relative; }
.solutions-track { overflow: hidden; border-radius: 0.75rem; }
.solutions-strip { display: flex; transition: transform 500ms ease-in-out; }
.solutions-slide {
  flex: 0 0 100%;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: 0.75rem; padding: 2rem; min-height: 17.5rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
@media (min-width: 768px) { .solutions-slide { padding: 3rem; } }
.solutions-slide h3 { font-size: 1.5rem; font-weight: 600; margin: 0 0 1rem; }
.solutions-slide p { color: hsl(var(--muted-foreground)); margin: 0; max-width: 36rem; }
.solutions-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 2.5rem; height: 2.5rem; border-radius: 9999px;
}
.solutions-arrow.left { left: -0.5rem; }
.solutions-arrow.right { right: -0.5rem; }
@media (min-width: 1024px) {
  .solutions-arrow.left { left: -3rem; }
  .solutions-arrow.right { right: -3rem; }
}
.solutions-dots { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1.5rem; }
.solutions-dots button {
  width: 0.75rem; height: 0.75rem; border-radius: 9999px;
  background: hsl(var(--muted-foreground) / 0.3);
  transition: background 200ms;
}
.solutions-dots button.active { background: hsl(var(--primary)); }

/* ============= FAQ ============= */
.faq-card h3 { font-size: 1.125rem; font-weight: 600; margin: 0 0 0.75rem; }
.faq-card p { color: hsl(var(--muted-foreground)); margin: 0; font-size: 0.9375rem; }

/* ============= Contact ============= */
.contact-grid { display: grid; gap: 2rem; max-width: 64rem; margin: 0 auto; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-info-row { display: flex; gap: 1rem; align-items: flex-start; }
.contact-icon {
  flex-shrink: 0;
  width: 3rem; height: 3rem; border-radius: 9999px;
  background: hsl(var(--primary) / 0.1); color: hsl(var(--primary));
  display: flex; align-items: center; justify-content: center;
}
.contact-icon svg { width: 1.5rem; height: 1.5rem; }
.contact-info-row .label-sm { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: hsl(var(--muted-foreground)); margin: 0 0 0.125rem; }
.contact-info-row .value { font-weight: 500; margin: 0; }

/* ============= Footer ============= */
.footer { background: hsl(var(--card)); border-top: 1px solid hsl(var(--border)); padding-block: 3rem; margin-top: 0; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.footer h4 { font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 0.75rem; }
.footer p, .footer a, .footer button { font-size: 0.875rem; color: hsl(var(--muted-foreground)); }
.footer button { display: block; padding: 0.25rem 0; }
.footer-links a { display: block; padding: 0.25rem 0; text-decoration: none; }
.footer button:hover, .footer a:hover { color: hsl(var(--foreground)); }
.footer-socials { display: flex; gap: 0.75rem; }
.footer-socials a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: 9999px;
  background: hsl(var(--muted)); color: hsl(var(--muted-foreground));
  transition: all 200ms;
}
.footer-socials a:hover { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.footer-bottom {
  border-top: 1px solid hsl(var(--border)); margin-top: 2rem; padding-top: 1.5rem;
  text-align: center; font-size: 0.875rem; color: hsl(var(--muted-foreground));
}
.footer-bottom p { margin: 0; }
/* The LSSI identifying line: smaller and dimmer than the copyright, present but not shouting. */
.footer-legal-id { margin-top: 0.5rem; font-size: 0.8125rem; opacity: 0.85; }

/* ============= Page (blog/post) ============= */
.page-with-fixed-header { padding-top: 5rem; }
@media (min-width: 768px) { .page-with-fixed-header { padding-top: 6rem; } }

.blog-card { overflow: hidden; }
.blog-card .img-wrap { aspect-ratio: 16/9; overflow: hidden; background: hsl(var(--muted)); }
.blog-card .img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms; }
.blog-card:hover .img-wrap img { transform: scale(1.05); }
.blog-card h3 {
  font-size: 1.125rem; font-weight: 600; margin: 0.75rem 0 0.5rem;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card .excerpt {
  color: hsl(var(--muted-foreground)); font-size: 0.875rem; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.search-row { display: flex; flex-wrap: wrap; gap: 0.75rem; max-width: 42rem; margin: 0 auto 2rem; }
.search-row .with-icon { position: relative; flex: 1 1 auto; min-width: 200px; }
.search-row .with-icon svg { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: hsl(var(--muted-foreground)); }
.search-row .with-icon input { padding-left: 2.5rem; }
.search-row select { width: 100%; max-width: 12rem; }
/* O seletor de quantidade é o mais curto dos três controlos e o menos importante:
   fica com a largura do seu conteúdo e cede o espaço à busca, que é quem cresce. */
.search-row .select-narrow { max-width: 8rem; flex: 0 0 auto; }

/* Markdown content */
/* Artigo
   Duas medidas: a prosa fica numa largura confortável de leitura, e os elementos que
   ganham com espaço — tabelas, blocos de código, imagens — usam a largura cheia do
   artigo. Alinhados pela esquerda, então a diferença lê como intencional. */
.article { --prose: 46rem; max-width: 60rem; margin-inline: auto; }
.article-head { max-width: var(--prose); }
/* Capa do artigo em proporção natural. Antes era aspect-ratio:16/9 + object-fit:cover,
   que recortava as laterais: as capas são ~1.9:1, e nas que são diagrama o recorte
   cortava texto do próprio diagrama. Os atributos width/height no <img> reservam o
   espaço e evitam deslocamento de layout. */
.article-cover {
  width: 100%; height: auto;
  border-radius: var(--radius); margin-bottom: 1.5rem;
}
.article-title { font-size: clamp(1.75rem, 1.25rem + 2vw, 2.5rem); line-height: 1.15; margin: 0.75rem 0 0.5rem; }
.article-footer { max-width: var(--prose); }
.article-comments { --prose: 46rem; max-width: 60rem; margin-inline: auto; }
.article-comments > * { max-width: var(--prose); }

/* Approved comments render as highlighted cards: a muted tint plus a primary left
   accent bar so they stand out from the page in both light and dark themes (in dark,
   --card equals --background, so a plain card would not read as distinct). */
.comment-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
.comment {
  display: flex;
  gap: 0.875rem;
  background: hsl(var(--muted) / 0.3);
  border: 1px solid hsl(var(--border));
  border-left: 3px solid hsl(var(--primary));
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.comment-avatar {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
}
.comment-content { flex: 1 1 auto; min-width: 0; }
.comment-head { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.35rem; }
.comment-author { font-weight: 600; }
.comment-body { margin: 0; line-height: 1.6; overflow-wrap: anywhere; }

.content-html {
  line-height: 1.7;
  /* A seção de fontes lista URLs cruas, que o autolink do Markdig transforma em <a>.
     São tokens sem ponto de quebra: sem isto, uma URL longa empurra a página inteira
     para o lado no mobile — 880px de scrollWidth num viewport de 390px. */
  overflow-wrap: break-word;
}
.content-html a { overflow-wrap: anywhere; }
.content-html > p,
.content-html > ul,
.content-html > ol,
.content-html > h2,
.content-html > h3,
.content-html > h4,
.content-html > blockquote { max-width: var(--prose, 46rem); }
.content-html h2 { margin-top: 2rem; }
.content-html h3 { margin-top: 1.5rem; }
.content-html pre { background: hsl(var(--muted)); padding: 1rem; border-radius: var(--radius); overflow-x: auto; }
.content-html code { background: hsl(var(--muted)); padding: 0.125rem 0.375rem; border-radius: 0.25rem; font-size: 0.875em; }
.content-html pre code { background: transparent; padding: 0; }
.content-html blockquote { border-left: 3px solid hsl(var(--border)); padding-left: 1rem; color: hsl(var(--muted-foreground)); margin-inline: 0; }
.content-html a { color: hsl(var(--primary)); text-decoration: underline; }
.content-html img { border-radius: var(--radius); margin: 1.5rem 0; }

/* Tabelas de conteúdo
   O markdown não tinha estilo algum aqui — saía com o default do browser, sem borda
   nem padding. O contêiner rolável vem do MarkdownRenderer.WrapTables. */
.table-scroll {
  margin: 1.75rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* Evita que o swipe horizontal na tabela vire o gesto de "voltar" do navegador. */
  overscroll-behavior-x: contain;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
}
.content-html table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.55;
  /* Faz a tabela rolar dentro do contêiner em vez de esmagar as colunas no mobile. */
  min-width: 36rem;
}
.content-html thead th {
  background: hsl(var(--muted));
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}
.content-html th,
.content-html td {
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid hsl(var(--border));
  vertical-align: top;
}
.content-html thead th + th,
.content-html tbody td + td { border-left: 1px solid hsl(var(--border)); }
.content-html tbody tr:nth-child(even) { background: hsl(var(--muted) / 0.35); }
.content-html tbody tr:last-child td { border-bottom: 0; }
.content-html table code { white-space: nowrap; }

@media (max-width: 640px) {
  .content-html table { font-size: 0.875rem; min-width: 30rem; }
  .content-html th, .content-html td { padding: 0.5rem 0.625rem; }
}

/* Toast */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 100;
  background: hsl(var(--card)); color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border)); border-radius: var(--radius);
  padding: 0.75rem 1rem; box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.2);
  max-width: 24rem;
}
.toast.error { border-color: hsl(var(--destructive)); }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 0.25rem; margin-top: 2rem; }
/* <a> para as páginas e <span> para a atual e para as pontas — eram <button>, que
   nenhum crawler segue. O inline-flex repõe a centragem que o botão dava de graça. */
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.25rem; height: 2.25rem; padding: 0 0.75rem;
  border: 1px solid hsl(var(--border)); border-radius: var(--radius);
  background: hsl(var(--background));
  color: inherit; text-decoration: none;
}
.pagination .active { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); border-color: hsl(var(--primary)); }
.pagination .disabled { opacity: 0.5; cursor: not-allowed; }

/* Utils */
.text-muted-fg { color: hsl(var(--muted-foreground)); }
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.flex { display: flex; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.hidden { display: none; }
.block { display: block; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

.blazor-error-boundary {
  background: hsl(var(--destructive)); color: hsl(var(--destructive-foreground));
  padding: 1rem; border-radius: var(--radius);
}
.blazor-error-boundary::after { content: "An error has occurred."; }

/* ============= Oferta de idioma ============= */
/* Fixa no rodapé, e não no topo em fluxo, por dois motivos aprendidos em produção:
   o `.header` é `position: fixed` e cobria a faixa por inteiro, e estando no fluxo ela
   empurrava o `main` 38px para baixo enquanto o header ficava pinado — conteúdo
   desalinhado e faixa invisível. Fora do fluxo não empurra nada e não disputa espaço
   com o header nem com o `.celigo-topbar` do BareLayout. */
.lang-offer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: hsl(var(--accent));
  border-top: 1px solid hsl(var(--border));
  box-shadow: 0 -1px 4px rgb(0 0 0 / 0.06);
  font-size: 0.875rem;
}
.lang-offer-inner {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.5rem 1rem; min-height: 2.25rem;
}
.lang-offer a { color: hsl(var(--foreground)); text-decoration: none; font-weight: 500; }
.lang-offer a:hover { text-decoration: underline; }
.lang-offer a.lang-offer-dismiss {
  margin-left: auto; padding: 0.125rem 0.5rem; border-radius: var(--radius);
  color: hsl(var(--muted-foreground)); font-weight: 400; line-height: 1;
}
.lang-offer a.lang-offer-dismiss:hover {
  color: hsl(var(--foreground)); background: hsl(var(--background)); text-decoration: none;
}

/* Cookie consent banner. Built by analytics.js rather than by a component, so these classes
   are referenced only from there — see the comment at the top of that file for why. */
.consent-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 70;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: hsl(var(--background));
  border-top: 1px solid hsl(var(--border));
  box-shadow: 0 -1px 6px rgb(0 0 0 / 0.08);
  font-size: 0.875rem;
}
.consent-banner-text { margin: 0; flex: 1 1 20rem; color: hsl(var(--muted-foreground)); }
.consent-banner-link { color: hsl(var(--primary)); text-decoration: underline; }
.consent-banner-actions { display: flex; gap: 0.5rem; margin-left: auto; }

/* Consent checkbox on the contact and comment forms.
   The box keeps its native size so the affordance is obvious and the hit target is real;
   the label sits beside it and the informational note underneath in muted, smaller type. */
.consent-field { margin-bottom: 1rem; }
.consent-check { display: flex; align-items: flex-start; gap: 0.5rem; cursor: pointer; font-size: 0.875rem; line-height: 1.4; }
.consent-check input[type="checkbox"] { margin-top: 0.15rem; flex: 0 0 auto; width: 1rem; height: 1rem; }
.consent-check a { color: hsl(var(--primary)); text-decoration: underline; }
.consent-note { margin: 0.5rem 0 0; font-size: 0.75rem; line-height: 1.5; color: hsl(var(--muted-foreground)); }

/* Legal pages: a readable measure, a table that scrolls on small screens, and a linked
   table of contents. Kept token-driven so it inverts with the dark theme like everything else. */
.legal-container { padding-block: 3rem 4rem; }
.legal-page { max-width: 52rem; margin: 0 auto; }
.legal-header h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 0.75rem; }
.legal-summary { color: hsl(var(--muted-foreground)); font-size: 1.05rem; line-height: 1.6; margin: 0 0 0.5rem; }
.legal-updated { color: hsl(var(--muted-foreground)); font-size: 0.8125rem; margin: 0 0 2rem; }
.legal-toc {
  background: hsl(var(--muted) / 0.4); border: 1px solid hsl(var(--border));
  border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 2.5rem;
}
.legal-toc ol { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.35rem; }
.legal-toc a { color: hsl(var(--primary)); text-decoration: none; font-size: 0.9rem; }
.legal-toc a:hover { text-decoration: underline; }
.legal-section { margin-bottom: 2.5rem; scroll-margin-top: 5rem; }
.legal-section h2 { font-size: 1.25rem; margin: 0 0 0.75rem; }
.legal-section-number { color: hsl(var(--muted-foreground)); font-weight: 600; margin-right: 0.25rem; }
.legal-section p { line-height: 1.7; margin: 0 0 0.75rem; }
.legal-section a { color: hsl(var(--primary)); text-decoration: underline; }
.legal-list { margin: 0 0 0.75rem; padding-left: 1.25rem; display: grid; gap: 0.4rem; line-height: 1.6; }
.legal-table-wrap { overflow-x: auto; margin: 0.5rem 0 0.75rem; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; min-width: 30rem; }
.legal-table th, .legal-table td {
  border: 1px solid hsl(var(--border)); padding: 0.6rem 0.75rem; text-align: left; vertical-align: top;
}
.legal-table thead th { background: hsl(var(--muted) / 0.5); font-weight: 600; }
.legal-table th[scope="row"] { font-weight: 600; white-space: nowrap; }
