/* ==========================================================================
   Jatobá Lab, Transparência & LGPD
   CSS único, estático, sem dependências.
   Tipografia: Geist Sans + Geist Mono (self-hosted, OFL 1.1).
   ========================================================================== */

/* ---------- Fontes ---------- */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/geist-sans-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;
}

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/geist-sans-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: "Geist";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/geist-sans-latin-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: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/geist-mono-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;
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/geist-mono-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;
}

/* ---------- Tokens (shadcn) ---------- */

:root {
  color-scheme: light;

  --background: #fafaf9;
  --foreground: #1c1917;
  --card: #ffffff;
  --card-foreground: #1c1917;
  --muted: #f5f5f4;
  --muted-foreground: #57534e;
  --border: #e7e5e4;
  --border-strong: #d6d3d1;
  --input: #e7e5e4;
  --primary: #111111;
  --primary-foreground: #ffffff;
  --primary-hover: #333333;
  --primary-soft: #f5f5f4;
  --ring: #111111;

  --warning: #111111;
  --warning-soft: #f5f5f4;
  --warning-border: #d6d3d1;

  --radius: 0.875rem;
  --radius-sm: 0.5rem;
  --radius-xs: 0.375rem;

  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow-md: 0 10px 24px -12px rgba(28, 25, 23, 0.18),
    0 2px 6px -2px rgba(28, 25, 23, 0.06);

  --header-bg: rgba(250, 250, 249, 0.82);
  --header-h: 4rem;
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
    monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --background: #0c0a09;
    --foreground: #f5f5f4;
    --card: #161412;
    --card-foreground: #f5f5f4;
    --muted: #1c1917;
    --muted-foreground: #a8a29e;
    --border: #292524;
    --border-strong: #44403c;
    --input: #292524;
    --primary: #f5f5f4;
    --primary-foreground: #0c0a09;
    --primary-hover: #d6d3d1;
    --primary-soft: #1c1917;
    --ring: #f5f5f4;

    --warning: #f5f5f4;
    --warning-soft: #1c1917;
    --warning-border: #44403c;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 12px 28px -14px rgba(0, 0, 0, 0.7),
      0 2px 6px -2px rgba(0, 0, 0, 0.5);

    --header-bg: rgba(12, 10, 9, 0.78);
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--primary);
  color: var(--primary-foreground);
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--primary) 38%, transparent);
}

a:hover {
  text-decoration-color: currentColor;
}

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

h1,
h2,
h3,
h4 {
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.028em;
  text-wrap: balance;
  margin: 0;
}

p {
  text-wrap: pretty;
}

code,
kbd,
samp {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 0.1em 0.35em;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0.75rem;
  z-index: 100;
  background: var(--card);
  color: var(--foreground);
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.skip:focus {
  left: 1rem;
}

/* ---------- Tipografia utilitária ---------- */

.lead {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--muted-foreground);
  max-width: 40rem;
  margin: 0 0 1.5rem;
}

/* ---------- Botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 2.5rem;
  padding: 0 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: var(--primary-foreground);
}

.btn-outline {
  background: var(--card);
  border-color: var(--border);
  color: var(--foreground);
}

.btn-outline:hover {
  background: var(--muted);
  border-color: var(--border-strong);
  color: var(--foreground);
}

.btn-sm {
  height: 2.125rem;
  padding: 0 0.8rem;
  font-size: 0.8125rem;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--background);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--foreground);
  text-decoration: none;
  flex: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius-xs);
  background: var(--primary);
  color: var(--primary-foreground);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
}

.brand-stack {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: inline-block;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-xs);
  color: var(--muted-foreground);
  font-size: 0.875rem;
  font-weight: 450;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
  background: var(--muted);
  color: var(--foreground);
}

.site-nav a[aria-current="page"] {
  background: var(--muted);
  color: var(--foreground);
  font-weight: 500;
}

.header-cta {
  flex: none;
}

@media (max-width: 1080px) {
  .brand-sub {
    display: none;
  }
}

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    row-gap: 0.6rem;
    padding-block: 0.65rem;
  }

  .site-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .site-nav ul {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-nav ul::-webkit-scrollbar {
    display: none;
  }

  .site-nav a {
    padding: 0.35rem 0.55rem;
    font-size: 0.8125rem;
  }

  .header-cta {
    margin-left: auto;
  }
}

/* ---------- Hero (home) ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 4rem;
  align-items: start;
  padding: 4.5rem 0 4rem;
}

.hero h1 {
  font-size: clamp(2.35rem, 5.4vw, 3.5rem);
  line-height: 1.03;
  letter-spacing: -0.038em;
  margin: 0 0 1.25rem;
}

.h1-sub {
  display: block;
  color: var(--muted-foreground);
  font-weight: 450;
}

.hero .lead {
  max-width: 34rem;
}

.hero-copy {
  min-width: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.meta-line {
  margin: 1.75rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

@media (max-width: 1000px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 3rem 0 2.5rem;
  }
}

/* ---------- Ficha / card de status ---------- */

.card {
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.ficha {
  padding: 0.5rem 1.5rem 0.75rem;
}

.ficha-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-foreground);
  margin: 1rem 0 0.25rem;
}

.ficha dl {
  margin: 0;
}

.ficha .row {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--border);
}

.ficha .row:first-of-type {
  border-top: 0;
}

.ficha dt {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-foreground);
  padding-top: 0.2rem;
}

.ficha dd {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
}

.ficha .ficha-foot {
  border-top: 1px solid var(--border);
  padding-top: 0.9rem;
  margin-top: 0.25rem;
}

.ficha .ficha-foot a {
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
}

.ficha .ficha-foot a:hover {
  text-decoration: underline;
}

.card h3 {
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.card > p {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.card > p:last-child {
  margin-bottom: 0;
}

/* ---------- Seções ---------- */

.section {
  padding: 3.5rem 0;
  border-top: 1px solid var(--border);
}

.section-head {
  max-width: 44rem;
  margin-bottom: 2rem;
}

.section-head h2 {
  font-size: clamp(1.5rem, 2.6vw, 1.875rem);
  margin: 0 0 0.75rem;
}

.section-head p:last-child {
  margin: 0;
  color: var(--muted-foreground);
}

.section > p {
  max-width: 46rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 3.5rem;
  align-items: start;
}

.split h2 {
  font-size: clamp(1.5rem, 2.6vw, 1.875rem);
  margin: 0 0 1rem;
}

.split p {
  color: var(--muted-foreground);
  margin: 0 0 1rem;
}

.split p strong {
  color: var(--foreground);
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ---------- Grid de cards ---------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}

.card-link {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    transform 0.15s ease;
}

.card-link:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: inherit;
}

.card-link h3 {
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.45rem;
}

.card-link p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted-foreground);
}

.card-cta {
  margin-top: auto;
  padding-top: 1.35rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--primary);
}

/* ---------- Feature grid (compromissos) ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.feature {
  background: var(--card);
  padding: 1.5rem;
}

.feature h3 {
  font-size: 0.9375rem;
  letter-spacing: -0.015em;
  margin: 0 0 0.35rem;
}

.feature p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted-foreground);
}

@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Lista com marcadores ---------- */

.check-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: 0.6rem;
}

.check-list li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.9375rem;
  color: var(--foreground);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 1px;
  background: var(--primary);
}

/* ---------- CTA band ---------- */

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
  margin: 2rem 0 4.5rem;
  padding: 2.25rem 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.cta-band h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
  margin: 0 0 0.5rem;
}

.cta-band p {
  margin: 0;
  color: var(--muted-foreground);
  max-width: 36rem;
}

@media (max-width: 640px) {
  .cta-band {
    padding: 1.75rem;
  }
}

/* ---------- Documentos (layout) ---------- */

.doc-layout {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: 4rem;
  align-items: start;
  padding-top: 3rem;
  padding-bottom: 4.5rem;
}

.doc-aside {
  min-width: 0;
  position: sticky;
  top: calc(var(--header-h) + 1.75rem);
  max-height: calc(100vh - var(--header-h) - 3.5rem);
  overflow-y: auto;
  scrollbar-width: thin;
}

.toc {
  min-width: 0;
}

.toc-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-foreground);
  margin: 0 0 0.9rem;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border);
}

.toc li {
  margin: 0;
}

.toc a {
  display: block;
  padding: 0.3rem 0 0.3rem 0.85rem;
  margin-left: -1px;
  border-left: 1px solid transparent;
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.toc a:hover {
  color: var(--foreground);
  border-left-color: var(--border-strong);
}

@media (max-width: 900px) {
  .doc-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.25rem;
    padding-top: 2rem;
  }

  .doc-aside {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 0 0 1.25rem;
    border-bottom: 1px solid var(--border);
  }

  .toc ol {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    border-left: 0;
    scrollbar-width: none;
  }

  .toc ol::-webkit-scrollbar {
    display: none;
  }

  .toc li {
    flex: 0 0 auto;
  }

  .toc a {
    padding: 0.2rem 0;
    border-left: 0;
    font-size: 0.8125rem;
    white-space: nowrap;
  }

  .toc a:hover {
    border-left-color: transparent;
  }
}

/* ---------- Prosa (documentos) ---------- */

.prose {
  max-width: 46rem;
  min-width: 0;
  counter-reset: section;
}

.doc-head {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.doc-head h1 {
  font-size: clamp(2rem, 4.6vw, 2.9rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin: 0 0 1rem;
}

.doc-head .lead {
  margin-bottom: 1.5rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.prose h2 {
  counter-increment: section;
  font-size: clamp(1.3rem, 2.4vw, 1.55rem);
  margin: 3rem 0 1rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.prose h2::before {
  content: counter(section) ". ";
  color: var(--muted-foreground);
  font-weight: 500;
}

.prose h3 {
  font-size: 1.0625rem;
  margin: 2rem 0 0.5rem;
  letter-spacing: -0.02em;
}

.prose p {
  margin: 0 0 1rem;
  font-size: 1.0625rem;
  line-height: 1.72;
}

.prose ul,
.prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}

.prose li {
  margin: 0.4rem 0;
  font-size: 1.0625rem;
  line-height: 1.65;
}

.prose li > ul,
.prose li > ol {
  margin-top: 0.4rem;
  margin-bottom: 0.25rem;
}

.prose li::marker {
  color: var(--muted-foreground);
}

.prose strong {
  font-weight: 600;
}

.prose a {
  overflow-wrap: break-word;
}

.prose .callout p {
  font-size: 1rem;
  margin-bottom: 0;
}

.prose .callout ul {
  font-size: 1rem;
  margin-bottom: 0;
}

.prose .callout li {
  font-size: 1rem;
}

/* ---------- Listas de definição ---------- */

.deflist {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr);
  margin: 1.75rem 0;
  border-top: 1px solid var(--border);
}

.deflist dt {
  padding: 0.85rem 1rem 0.85rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--muted-foreground);
}

.deflist dd {
  margin: 0;
  padding: 0.85rem 0 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border);
  font-size: 0.9375rem;
  line-height: 1.6;
}

@media (max-width: 560px) {
  .deflist {
    grid-template-columns: 1fr;
  }

  .deflist dt {
    padding-bottom: 0.1rem;
    border-bottom: 0;
  }

  .deflist dd {
    padding: 0 0 0.9rem;
    border-left: 0;
  }
}

/* ---------- Tabelas ---------- */

.table-scroll {
  margin: 1.75rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.table-scroll::-webkit-scrollbar {
  height: 8px;
}

.table-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.table-scroll::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 36rem;
}

caption {
  caption-side: bottom;
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  border-top: 1px solid var(--border);
}

thead th {
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 0.75rem;
  font-weight: 600;
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 0.75rem;
}

tbody th,
tbody td {
  border-bottom: 1px solid var(--border);
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

/* Primeira coluna fixa em tabelas largas (ROPA, suboperadores). */
.table-scroll th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--card);
  box-shadow: 1px 0 0 var(--border);
}

.table-scroll thead th:first-child {
  z-index: 2;
  background: var(--muted);
}

tbody th {
  font-weight: 600;
  color: var(--foreground);
}

tbody tr {
  transition: background-color 0.12s ease;
}

tbody tr:hover {
  background: color-mix(in srgb, var(--muted) 60%, transparent);
}

td {
  color: var(--muted-foreground);
}

td strong,
td a {
  color: var(--foreground);
}

td a {
  color: var(--primary);
}

/* ---------- Callouts ---------- */

.callout {
  margin: 1.75rem 0;
  padding: 1.15rem 1.35rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--card);
}

.callout.warn {
  border-color: var(--border-strong);
  background: var(--card);
}

.callout-title {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--foreground);
}

.callout.warn .callout-title {
  color: var(--foreground);
}

.callout p:last-child,
.callout ul:last-child {
  margin-bottom: 0;
}

/* ---------- 404 ---------- */

.error-page {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 0;
}

.error-code {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 14vw, 7rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.06em;
  color: var(--border-strong);
  margin: 0 0 1.5rem;
}

.error-page h1 {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  margin: 0 0 0.75rem;
}

.error-page p {
  color: var(--muted-foreground);
  max-width: 32rem;
  margin: 0 0 1rem;
}

.error-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  background: var(--background);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr;
  gap: 2.5rem;
}

.footer-brand p {
  margin: 0.9rem 0 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted-foreground);
  max-width: 24rem;
}

.footer-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-foreground);
  margin: 0 0 0.9rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.footer-col a {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--foreground);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.footer-bottom p {
  margin: 0;
}

@media (max-width: 800px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Impressão ---------- */

@media print {
  .site-header,
  .site-footer,
  .doc-aside,
  .hero-actions,
  .cta-band,
  .skip {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .container,
  .prose {
    max-width: none;
  }

  .doc-layout {
    display: block;
    padding: 0;
  }

  a {
    color: #000;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.75em;
  }

  .table-scroll {
    overflow: visible;
    box-shadow: none;
  }

  table {
    min-width: 0;
    font-size: 9pt;
  }

  .prose h2 {
    break-after: avoid;
  }

  .card,
  .callout,
  .table-scroll {
    break-inside: avoid;
  }
}

/* ---------- Movimento reduzido ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .card-link:hover {
    transform: none;
  }
}

/* ==========================================================================
   Página agentes.jatoba.tech: diagramas, ferramentas e artefatos
   ========================================================================== */

/* ---------- Diagrama de camadas ---------- */

.arch {
  margin: 2.5rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}

.arch-layer {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1.1rem 1.35rem;
  border-top: 1px solid var(--border);
}

.arch-layer:first-child {
  border-top: 0;
}

.arch-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--foreground);
}

.arch-label span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted-foreground);
}

.arch-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-content: flex-start;
}

.arch-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--background);
  font-size: 0.8125rem;
  color: var(--foreground);
}

.arch-item img {
  width: 1rem;
  height: 1rem;
  object-fit: contain;
}

.arch-item.accent {
  border-color: var(--border-strong);
  background: var(--muted);
  font-weight: 500;
}

@media (max-width: 720px) {
  .arch-layer {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }
}

/* ---------- BPMN ---------- */

.bpmn-scroll {
  margin: 2rem 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  overflow-x: auto;
}

.bpmn {
  display: block;
  min-width: 56rem;
  width: 100%;
  height: auto;
}

.bpmn text {
  font-family: var(--font-sans);
  fill: var(--foreground);
}

.bpmn .lane-label {
  font-size: 11px;
  font-weight: 600;
  fill: var(--muted-foreground);
}

.bpmn .task text {
  font-size: 11px;
}

.bpmn .task rect {
  fill: var(--background);
  stroke: var(--border-strong);
  stroke-width: 1;
}

.bpmn .task.human rect {
  fill: var(--muted);
}

.bpmn .event circle {
  fill: var(--card);
  stroke: var(--foreground);
  stroke-width: 1.5;
}

.bpmn .gateway polygon {
  fill: var(--card);
  stroke: var(--foreground);
  stroke-width: 1.2;
}

.bpmn .flow {
  fill: none;
  stroke: var(--muted-foreground);
  stroke-width: 1.2;
}

.bpmn .lane {
  fill: none;
  stroke: var(--border);
  stroke-width: 1;
}

.bpmn .lane-band {
  fill: var(--muted);
  stroke: var(--border);
  stroke-width: 1;
}

/* ---------- Ferramentas ---------- */

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1rem;
  margin: 1.75rem 0;
}

.tool-card {
  display: flex;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
}

.tool-card img {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
  flex: none;
}

.tool-card h4 {
  margin: 0 0 0.2rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.tool-card p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--muted-foreground);
}

.tool-card .tool-license {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* ---------- Artefatos ---------- */

.artifact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1rem;
  margin: 1.75rem 0;
}

.artifact {
  padding: 1.05rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
}

.artifact h3 {
  margin: 0 0 0.4rem;
  font-size: 0.9375rem;
}

.artifact p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted-foreground);
}

/* ---------- Matriz ---------- */

.matrix td:first-child,
.matrix th:first-child {
  white-space: nowrap;
}

.matrix .yes {
  font-weight: 600;
}

.matrix .no {
  color: var(--muted-foreground);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0 0;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.legend i {
  width: 0.7rem;
  height: 0.7rem;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  background: var(--background);
}

.legend i.human {
  background: var(--muted);
}

/* ---------- Duas colunas de conteúdo ---------- */

.split-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.split-2 > div > h3 {
  margin-top: 0;
}

@media (max-width: 820px) {
  .split-2 {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }
}

/* ---------- Chamada de decisão ---------- */

.decision {
  margin: 2rem 0;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--muted);
}

.decision h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.decision p:last-child {
  margin-bottom: 0;
}

/* ---------- Print ---------- */

@media print {
  .bpmn-scroll,
  .arch,
  .tool-card,
  .artifact {
    break-inside: avoid;
  }
}
