:root {
  --ink: #10231d;
  --muted: #52665e;
  --paper: #f5faf8;
  --surface: #ffffff;
  --line: #d3e4de;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --brand-soft: #f0fdfa;
  --accent: #5eead4;
  --accent-strong: #14b8a6;
  --warning: #8a4b00;
  --warning-soft: #fff4e0;
  --danger: #8a1f1f;
  --danger-soft: #fdecec;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 35, 29, 0.06), 0 12px 32px rgba(15, 118, 110, 0.08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

::selection {
  background: #99f6e4;
  color: #0f1f1b;
}

a {
  color: var(--brand-dark);
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--brand);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.table-wrap:focus-visible {
  outline: 3px solid #e0a100;
  outline-offset: 2px;
}

.wrap {
  width: min(1180px, 100% - 2rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 0.9rem;
  border-radius: 0 0 var(--radius) var(--radius);
}

.skip-link:focus {
  top: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block: 0.85rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  box-shadow: 0 2px 10px rgba(15, 118, 110, 0.18);
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text strong {
  font-size: 1.06rem;
  font-weight: 800;
}

.brand-text span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: 0.01em;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.95rem;
}

.site-header nav a {
  text-decoration: none;
  padding: 0.35rem 0.2rem;
  border-bottom: 2px solid transparent;
}

.site-header nav a[aria-current="page"] {
  border-bottom-color: var(--brand);
  font-weight: 650;
}

.preview-bar {
  background: var(--warning-soft);
  color: var(--warning);
  border-bottom: 1px solid #eed7ae;
  font-size: 0.82rem;
  text-align: center;
  padding: 0.35rem 1rem;
}

main {
  padding-block: 1.5rem 3rem;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(1.8rem, 4.2vw, 2.7rem);
  letter-spacing: -0.03em;
  margin: 0.4rem 0 0.8rem;
}

h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  margin-top: 1.8rem;
}

h3 {
  font-size: 1.08rem;
  margin-top: 0;
}

p {
  max-width: 72ch;
}

.lead {
  font-size: 1.1rem;
  color: #33433c;
  max-width: 70ch;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 0.2rem;
}

.muted {
  color: var(--muted);
}

.small,
.hint {
  font-size: 0.84rem;
  color: var(--muted);
}

.breadcrumbs {
  margin-bottom: 0.8rem;
  font-size: 0.86rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.3rem;
  color: var(--muted);
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 300px at 100% 0%, #ccfbf1 0%, transparent 62%),
    linear-gradient(180deg, var(--brand-soft), #ffffff 88%);
  border: 1px solid #b9e6dc;
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(1.3rem, 3vw, 2.4rem);
  margin-bottom: 1.7rem;
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  right: -50px;
  bottom: -70px;
  width: 250px;
  height: 250px;
  background: url("/assets/favicon.svg") center / contain no-repeat;
  opacity: 0.055;
  pointer-events: none;
}

.hero-head {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(15, 118, 110, 0.18);
  flex: none;
}

.hero .eyebrow {
  margin-top: 0;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid > * {
  min-width: 0;
}

.grid.three {
  grid-template-columns: 1fr;
}

/* OIP-24 — quatro áreas de soluções na homepage. */
.grid.four {
  grid-template-columns: 1fr;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.05rem;
  box-shadow: var(--shadow);
  min-width: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: #99f6e4;
  box-shadow: 0 18px 42px rgba(15, 118, 110, 0.14);
}

.card h2 a,
.card h3 a {
  text-decoration: none;
}

.card h2 a:hover,
.card h3 a:hover {
  text-decoration: underline;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.card-head h2 {
  font-size: 1.12rem;
  margin: 0 0 0.25rem;
}

.supplier-card .mini-facts {
  display: grid;
  gap: 0.35rem;
  margin: 0.6rem 0;
  font-size: 0.9rem;
}

.supplier-card .mini-facts div {
  display: grid;
  grid-template-columns: 7.2rem 1fr;
  gap: 0.4rem;
}

.supplier-card dt {
  color: var(--muted);
}

.supplier-card dd {
  margin: 0;
}

.badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.24rem 0.5rem;
  border-radius: 999px;
  background: #eef1ef;
  color: #33433c;
  border: 1px solid #d5ddd8;
  white-space: nowrap;
}

.badge.unknown {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: #efd8ae;
}

/* OIP-24 — estado "Em preparação" dos cartões de soluções (neutro, não comercial). */
.badge.soon {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: #efd8ae;
}

.badge.status-verified,
.badge.status-published,
.badge.status-live {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-color: #bfded2;
}

.badge.status-disputed,
.badge.status-expired,
.badge.status-rejected {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: #efc9c9;
}

.search-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0 1.2rem;
}

.field {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.field label,
.field legend {
  font-weight: 650;
  font-size: 0.9rem;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 0.55rem 0.6rem;
  border: 1px solid #b9c4be;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

fieldset.field {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.2rem 0.8rem 0.2rem 0;
  font-size: 0.9rem;
}

.inline-check input,
.field.checkbox input {
  width: auto;
}

.field.checkbox label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 400;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

button,
.button {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border: 1px solid var(--brand);
  border-radius: 10px;
  padding: 0.6rem 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.18);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

button:hover,
.button:hover {
  background: var(--brand-dark);
  color: #fff;
}

.button.secondary {
  background: transparent;
  color: var(--brand-dark);
}

.button.secondary:hover {
  background: var(--brand-soft);
}

/* OIP-21: alvos de toque >= 44 px (WCAG 2.5.5) na navegação e nos CTAs. */
.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.header-cta {
  white-space: nowrap;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

a.button,
button {
  min-height: 44px;
}

.hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.notice {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin: 1.2rem 0;
}

.notice.warning {
  border-left-color: #c47a00;
  background: var(--warning-soft);
}

.notice.success {
  border-left-color: var(--brand);
  background: var(--brand-soft);
}

.empty-state {
  background: var(--surface);
  border: 1px dashed #b9c4be;
  border-radius: var(--radius);
  padding: 1.2rem;
  margin: 1rem 0;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.2rem;
}

.pagination a,
.pagination span {
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  background: #fff;
}

.pagination [aria-current="page"] {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.supplier-detail {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1rem, 3vw, 1.6rem);
  box-shadow: var(--shadow);
}

.detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.facts {
  display: grid;
  gap: 0;
  margin: 1rem 0;
  border-top: 1px solid var(--line);
}

.facts > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.facts dt {
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--muted);
}

.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.supplier-card dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.steps {
  padding-left: 1.2rem;
}

.steps li {
  margin-bottom: 0.45rem;
}

.prose {
  max-width: 76ch;
}

.prose h2 {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  margin: 1rem 0;
}

.toc ol {
  columns: 1;
  margin: 0;
  padding-left: 1.2rem;
}

.checklist-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.checklist-list li {
  padding: 0.35rem 0;
  border-bottom: 1px dotted var(--line);
}

.checklist-list label {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
}

.checklist-list input {
  width: auto;
  margin-top: 0.28rem;
}

.print-actions {
  display: flex;
  gap: 0.6rem;
  margin: 1.2rem 0;
}

.table-wrap {
  overflow-x: auto;
  margin: 0.8rem 0;
  max-width: 100%;
}

.table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 0;
}

.table th,
.table td {
  text-align: left;
  padding: 0.55rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table th {
  background: #f1f4f2;
}

.site-footer {
  background: #0f1f1b;
  color: #ccfbf1;
  border-top: 0;
  padding: 1.6rem 0;
  font-size: 0.9rem;
}

.site-footer a {
  color: #99f6e4;
}

.site-footer a:hover {
  color: #ffffff;
}

.footer-inner p {
  margin: 0.4rem 0;
}

/* O cinza --muted não atinge 4.5:1 sobre o fundo escuro do footer. */
.site-footer .small,
.site-footer .hint {
  color: #a7c4b8;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.footer-brand img {
  border-radius: 8px;
  flex: none;
}

.footer-brand span {
  max-width: 72ch;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.25rem;
}

@media (max-width: 480px) {
  .hero-head {
    align-items: flex-start;
    gap: 0.7rem;
  }

  .hero-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .brand-icon {
    width: 32px;
    height: 32px;
  }

  .brand-text strong {
    font-size: 0.98rem;
  }

  .brand-text span {
    font-size: 0.72rem;
  }
}

@media (min-width: 390px) {
  .wrap {
    width: min(1180px, 100% - 2.4rem);
  }
}

@media (min-width: 640px) {
  .search-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-wide {
    grid-column: 1 / -1;
  }

  .form-actions {
    grid-column: 1 / -1;
  }

  .facts > div {
    grid-template-columns: 11rem 1fr;
    gap: 0.6rem;
  }
}

@media (min-width: 768px) {
  .grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-inner {
    flex-wrap: nowrap;
  }

  .toc ol {
    columns: 2;
  }
}

@media (min-width: 900px) {
  .search-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1440px) {
  body {
    font-size: 1.05rem;
  }

  .wrap {
    width: min(1240px, 100% - 3rem);
  }
}

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

@media print {
  .site-header,
  .site-footer,
  .preview-bar,
  .breadcrumbs,
  .print-actions,
  .skip-link {
    display: none !important;
  }

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

  main {
    padding: 0;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  .checklist-list li {
    break-inside: avoid;
  }

  .card,
  .notice {
    box-shadow: none;
    border: 1px solid #999;
  }
}
