@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/Fraunces.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  font-stretch: 100%;
}

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/Fraunces-Italic.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/InterVariable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/InterVariable-Italic.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #fafaf7;
  --paper-strong: #f3f2ec;
  --surface: #ffffff;
  --surface-soft: #f3f2ec;
  --ink: #0f172a;
  --muted: #5a6479;
  --line: #d6d8d3;
  --line-strong: #b6b9b1;
  --accent: #8a6a1f;
  --accent-hover: #6e541a;
  --accent-pressed: #574114;
  --accent-contrast: #ffffff;
  --accent-soft: rgba(138, 106, 31, 0.14);
  --accent-on-dark-bg: #d4af37;
  --bg-dark: #060b18;
  --bg-darker: #0b1220;
  --on-dark: #ffffff;
  --on-dark-muted: #c8cfdc;
  --teal: var(--accent);
  --teal-strong: var(--accent-hover);
  --amber: var(--accent);
  --green: #0a6b3b;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.11);
  --focus-ring: 0 0 0 3px rgba(138, 106, 31, 0.45);
  --font-body: "Inter", "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: var(--font-body);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "ss01" 1;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

code,
pre,
select {
  font-family: var(--font-mono);
}

code {
  overflow-wrap: anywhere;
}

pre {
  margin: 0;
  overflow-x: auto;
  border: 1px solid rgba(255, 253, 248, 0.16);
  border-radius: 8px;
  background: #121817;
  color: #f6f0df;
  padding: 20px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.site-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
}

.brand,
.site-header nav,
.site-footer nav,
.hero-actions,
.section-heading-row,
.model-card__top {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 900;
}

.brand-mark-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.site-header nav {
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-header nav a,
.site-header nav button,
.site-footer nav a,
.site-footer nav button,
.text-link {
  color: var(--muted);
  font-weight: 700;
}

.site-header nav a,
.site-header nav button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.site-header nav a:hover,
.site-header nav button:hover,
.site-header nav a[aria-current="page"],
.site-footer nav a:hover,
.site-footer nav button:hover,
.text-link:hover {
  color: var(--accent);
}

.site-header nav .nav-cta {
  background: var(--ink);
  color: var(--paper);
}

.site-footer nav button {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  padding: 64px max(24px, calc((100vw - 1180px) / 2));
  color: var(--on-dark);
  background: var(--bg-dark);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(6, 11, 24, 0.96) 0%, rgba(6, 11, 24, 0.9) 42%, rgba(6, 11, 24, 0.7) 68%, rgba(6, 11, 24, 0.86) 100%),
    linear-gradient(180deg, rgba(6, 11, 24, 0.18) 0%, rgba(6, 11, 24, 0.88) 100%);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
}

.hero-image-light {
  display: none;
}

.hero-content {
  width: min(680px, 100%);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-hover);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow,
.privacy-band .eyebrow,
.page-hero .eyebrow {
  color: var(--accent-on-dark-bg);
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 460;
  font-size: 3rem;
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy,
.page-hero p {
  max-width: 700px;
  margin: 22px 0 0;
  color: var(--on-dark-muted);
  font-size: 1.2rem;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  min-width: 0;
  max-width: 100%;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 16px;
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
}

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

.button span,
.theme-toggle span,
.site-header nav a span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.button svg,
.admin-tabs button svg,
.site-header nav .nav-cta svg,
.theme-toggle svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle {
  max-width: 100%;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 12px;
  font: inherit;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.theme-toggle__icon {
  width: 17px;
  height: 17px;
  display: inline-grid;
  place-items: center;
}

.button-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}

.button-primary:hover {
  background: var(--accent-hover);
  color: var(--accent-contrast);
}

.button-primary span,
.button-primary svg {
  color: inherit;
}

.button-secondary {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--surface);
}

.button-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.button:disabled {
  cursor: wait;
  opacity: 0.72;
}

input:disabled,
select:disabled,
textarea:disabled {
  cursor: wait;
  opacity: 0.72;
}

.button-compact {
  min-height: 40px;
  padding: 8px 12px;
}

.hero-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 38px 0 0;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

.live-dot {
  position: relative;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-on-dark-bg);
}

.live-dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 999px;
  border: 2px solid var(--accent-on-dark-bg);
  opacity: 0;
  animation: live-pulse 2.4s ease-out infinite;
}

@keyframes live-pulse {
  0% {
    transform: scale(0.35);
    opacity: 0.85;
  }
  70%,
  100% {
    transform: scale(1.05);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot::after {
    animation: none;
  }
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 0;
}

.hero-metrics div {
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  padding-top: 14px;
}

.hero-metrics dt {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

.hero-metrics dd {
  margin: 6px 0 0;
  display: grid;
  gap: 3px;
  color: var(--on-dark-muted);
}

.hero-metrics dd strong {
  min-width: 0;
  font-size: 1.9rem;
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--on-dark);
  overflow-wrap: anywhere;
}

.hero-metrics dd span {
  font-size: 0.82rem;
  line-height: 1.35;
}

.stats-band {
  background: var(--surface-soft);
}

.public-stat-grid,
.stats-detail-grid {
  display: grid;
  gap: 16px;
}

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

.stats-detail-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  margin-top: 16px;
}

.public-stat-grid article,
.stats-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.public-stat-grid article {
  display: grid;
  align-content: space-between;
  min-height: 150px;
  padding: 20px;
}

.public-stat-grid span,
.stats-updated {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.public-stat-grid strong {
  color: var(--ink);
  font-size: 2.35rem;
  line-height: 1;
  overflow-wrap: anywhere;
}

.public-stat-grid p {
  margin: 8px 0 0;
}

.stats-panel {
  padding: 20px;
}

.stats-list,
.stats-bars {
  display: grid;
  gap: 10px;
}

.stats-panel h3 {
  margin-bottom: 14px;
}

.stats-list-row,
.stats-bar-row {
  min-width: 0;
  display: grid;
  align-items: center;
  gap: 12px;
}

.stats-list-row {
  grid-template-columns: minmax(0, 1fr) auto;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.stats-list-row span,
.stats-list-row strong,
.stats-bar-row span,
.stats-bar-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.stats-list-row strong,
.stats-bar-row strong {
  font-size: 0.9rem;
}

.stats-bar-row {
  grid-template-columns: 58px minmax(0, 1fr) 64px;
}

.stats-bar-row i {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.stats-bar-row i::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar, 0%);
  border-radius: inherit;
  background: var(--accent);
}

.stats-updated {
  margin: 16px 0 0;
}

.section,
.privacy-band,
.pilot-band,
.page-hero,
.docs-layout,
.site-footer {
  padding-left: max(24px, calc((100vw - 1180px) / 2));
  padding-right: max(24px, calc((100vw - 1180px) / 2));
}

.section {
  padding-top: 78px;
  padding-bottom: 78px;
}

.split {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1.15fr);
  gap: 56px;
  align-items: start;
}

.stack {
  display: grid;
  gap: 18px;
}

h2,
h3,
p {
  margin-top: 0;
}

h2 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-weight: 520;
  font-size: 2rem;
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-weight: 560;
  font-size: 1.05rem;
  line-height: 1.25;
  letter-spacing: 0;
}

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

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading-row {
  justify-content: space-between;
  gap: 24px;
  max-width: none;
}

.steps,
.decision-grid,
.privacy-grid,
.model-grid,
.audience-grid,
.code-grid,
.error-grid {
  display: grid;
  gap: 16px;
}

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

.steps article,
.decision-grid article,
.privacy-grid article,
.model-card,
.audience-grid article,
.catalog-item,
.error-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.steps article {
  padding: 22px;
}

.steps span,
.decision-grid span {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--teal);
  font-weight: 900;
}

.decision-section {
  background: var(--paper);
  padding-top: 24px;
}

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

.decision-grid article {
  min-width: 0;
  min-height: 260px;
  display: grid;
  align-content: start;
  padding: 22px;
}

.decision-grid h3,
.decision-grid p {
  min-width: 0;
}

.privacy-band {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
  gap: 42px;
  padding-top: 70px;
  padding-bottom: 70px;
  background: var(--bg-dark);
  color: var(--on-dark);
}

.privacy-band h2,
.privacy-band h3 {
  color: var(--on-dark);
}

.privacy-band p {
  color: var(--on-dark-muted);
}

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

.privacy-grid article {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: none;
  padding: 20px;
}

.code-section {
  background: var(--surface-soft);
}

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

.code-grid article {
  min-width: 0;
}

.code-grid h3 {
  margin-bottom: 10px;
}

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

.model-card,
.catalog-item {
  padding: 20px;
}

.model-card__top {
  justify-content: space-between;
  gap: 14px;
}

.model-card__top span,
.catalog-item code {
  flex: none;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.tag-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.audience {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: 46px;
}

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

.audience-grid article {
  padding: 20px;
}

.pilot-band {
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(280px, 0.95fr);
  gap: 42px;
  align-items: center;
  padding-top: 70px;
  padding-bottom: 70px;
  background: var(--bg-dark);
  color: var(--on-dark);
}

.pilot-band h2,
.pilot-band h3 {
  color: var(--on-dark);
}

.pilot-band p {
  max-width: 720px;
  color: var(--on-dark-muted);
}

.pilot-card {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  padding: 24px;
}

.pilot-card ul {
  display: grid;
  gap: 10px;
  margin: 16px 0 22px;
  padding-left: 20px;
  color: var(--on-dark-muted);
}

.pilot-card li {
  padding-left: 2px;
}

.faq {
  padding-top: 44px;
}

details {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}

details:last-child {
  border-bottom: 1px solid var(--line);
}

summary {
  cursor: pointer;
  font-weight: 900;
}

details p {
  max-width: 760px;
  margin: 10px 0 0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 34px;
  padding-bottom: 34px;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 4px 0 0;
}

.site-footer nav {
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.contact-modal[hidden] {
  display: none;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 24px;
}

.contact-modal__scrim {
  position: fixed;
  inset: 0;
  border: 0;
  background: rgba(6, 11, 24, 0.72);
  cursor: pointer;
}

.contact-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.36);
}

.contact-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
}

.contact-dialog__header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.contact-dialog__header p:last-child {
  margin: 8px 0 0;
}

.contact-form {
  min-width: 0;
  display: grid;
  gap: 14px;
  overflow-y: auto;
  padding: 20px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.page-hero {
  padding-top: 82px;
  padding-bottom: 62px;
  background: var(--bg-dark);
  color: var(--on-dark);
}

.page-hero h1 {
  max-width: 780px;
}

.page-hero p {
  color: var(--on-dark-muted);
}

.catalog-section {
  background: var(--paper);
}

.catalog-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.catalog-item {
  display: grid;
  gap: 16px;
}

.catalog-item h2 {
  font-size: 1.35rem;
  margin: 0 0 4px;
}

.catalog-item h2 a {
  color: inherit;
  text-decoration: none;
}

.catalog-item h2 a:hover {
  text-decoration: underline;
}

.catalog-filters {
  display: grid;
  gap: 12px;
  margin: 0 0 20px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.catalog-filters legend {
  padding: 0;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
}

.filter-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  background: var(--surface);
}

.filter-chip:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.filter-chip input {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.catalog-count {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
}

.model-meta-detail {
  grid-template-columns: 1fr;
  max-width: 520px;
}

.model-meta-detail div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.model-meta {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 12px;
  margin: 0;
}

.model-meta div {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.model-meta dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.model-meta dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.docs-hero {
  padding-bottom: 54px;
}

.docs-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 42px;
  padding-top: 56px;
  padding-bottom: 80px;
}

.docs-nav {
  position: sticky;
  top: 24px;
  align-self: start;
  display: grid;
  gap: 8px;
  border-left: 2px solid var(--line);
  padding-left: 16px;
}

.docs-nav a {
  color: var(--muted);
  font-weight: 800;
}

.docs-content {
  display: grid;
  gap: 44px;
  max-width: 860px;
}

.docs-content section {
  min-width: 0;
}

.docs-content h2 {
  margin-bottom: 12px;
  font-size: 1.65rem;
}

.model-select {
  width: min(100%, 520px);
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface);
  color: var(--ink);
}

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

.error-grid article {
  padding: 18px;
}

@media (min-width: 900px) {
  .hero h1,
  .page-hero h1 {
    font-size: 5.2rem;
  }
}

@media (max-width: 980px) {
  .split,
  .privacy-band,
  .pilot-band,
  .audience,
  .docs-layout,
  .stats-detail-grid {
    grid-template-columns: 1fr;
  }

  .steps,
  .decision-grid,
  .privacy-grid,
  .model-grid,
  .audience-grid,
  .code-grid,
  .catalog-list,
  .error-grid,
  .public-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .docs-nav {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-left: 0;
    border-top: 2px solid var(--line);
    padding: 14px 0 0;
  }
}

@media (max-width: 680px) {
  .site-header,
  .site-footer,
  .section-heading-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header {
    gap: 12px;
  }

  .site-header nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    justify-content: stretch;
  }

  .site-header nav a,
  .site-header nav button,
  .site-header nav .theme-toggle {
    width: 100%;
  }

  .site-footer nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: 0;
    padding-top: 36px;
    padding-bottom: 32px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 2.35rem;
  }

  .hero-copy,
  .page-hero p {
    font-size: 1.05rem;
  }

  .hero::after {
    background: rgba(6, 10, 9, 0.58);
  }

  .hero-media img {
    object-position: 18% center;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 24px;
  }

  .hero-actions .button {
    min-height: 44px;
    padding: 10px 8px;
    font-size: 0.92rem;
    text-align: center;
  }

  .hero-live-badge {
    margin-top: 28px;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 12px;
  }

  .hero-metrics div {
    padding-top: 10px;
  }

  .hero-metrics dd strong {
    font-size: 1.6rem;
  }

  .steps,
  .decision-grid,
  .privacy-grid,
  .model-grid,
  .audience-grid,
  .code-grid,
  .catalog-list,
  .error-grid,
  .public-stat-grid,
  .stats-detail-grid,
  .model-meta,
  .docs-nav {
    grid-template-columns: 1fr;
  }

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

  .section,
  .privacy-band,
  .pilot-band,
  .page-hero,
  .docs-layout {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  pre {
    padding: 16px;
    font-size: 0.82rem;
  }
}

@media (max-width: 360px) {
  .site-header {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-actions,
  .hero-metrics {
    grid-template-columns: 1fr;
  }
}

.app-body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--surface-soft);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 24px;
}

.app-nav {
  display: grid;
  gap: 6px;
}

.app-nav a {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
  padding: 10px 12px;
}

/* O display:flex acima vence o [hidden] do navegador: o item escondido (o Admin) some de verdade. */
.app-nav a[hidden] {
  display: none;
}

.app-nav a svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-nav a:hover,
.app-nav a[aria-current] {
  background: var(--surface-soft);
  color: var(--teal);
}

.app-main {
  min-width: 0;
  width: 100%;
  padding: 28px clamp(24px, 3vw, 48px);
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.app-title-group {
  min-width: 0;
  flex: 1 1 260px;
}

.app-topbar h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.08;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.app-user {
  min-width: 0;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
  min-height: 46px;
  padding: 4px 12px 4px 4px;
}

.app-user:empty {
  display: none;
}

.app-user.is-image-only {
  min-width: 46px;
  justify-content: center;
  border-color: transparent;
  background: transparent;
  padding: 3px;
}

.app-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 0.82rem;
  font-weight: 1000;
}

.app-avatar-image {
  overflow: hidden;
  background: var(--surface-soft);
  color: var(--muted);
}

.app-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.app-user-name {
  min-width: 0;
  max-width: min(22vw, 220px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}

.app-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
}

.app-action-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* A organização aberta no painel (a conta da casa): some quando a pessoa não tem organização. */
.app-org {
  min-width: 0;
  max-width: min(40vw, 240px);
}

.app-org select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-weight: 800;
  padding: 0 14px;
}

.app-actions .theme-toggle,
.app-icon-button {
  width: 46px;
  min-width: 46px;
  min-height: 46px;
  padding: 0;
}

.app-actions .theme-toggle {
  position: relative;
}

.app-content {
  display: grid;
  gap: 18px;
}

.access-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid color-mix(in srgb, var(--amber) 55%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--amber) 13%, var(--surface));
  padding: 16px 18px;
}

.access-banner strong {
  display: block;
  margin-bottom: 2px;
}

.access-banner p {
  margin: 0;
}

.access-banner span {
  flex: 0 0 auto;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--amber);
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 900;
}

.access-banner.danger {
  border-color: color-mix(in srgb, #a63f3f 60%, var(--line));
  background: color-mix(in srgb, #a63f3f 12%, var(--surface));
}

.access-banner.danger span {
  color: #a63f3f;
}

.app-shell[data-loading="true"] .app-content::before {
  content: "Carregando...";
  color: var(--muted);
}

.app-auth-shell {
  grid-template-columns: minmax(0, 1fr);
}

.app-auth-shell .app-sidebar {
  display: none;
}

.app-auth-shell .app-main {
  width: min(100%, 592px);
  margin: 0 auto;
  padding: 64px 16px 48px;
}

.app-auth-shell .app-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  justify-content: stretch;
}

.app-auth-shell .app-actions {
  width: auto;
  justify-content: end;
}

.app-auth-shell .app-content,
.app-auth-shell .auth-panel {
  width: 100%;
  min-width: 0;
}

.app-auth-shell .app-user {
  display: none;
}

.stat-grid,
.panel-grid {
  display: grid;
  gap: 16px;
}

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

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

.panel-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
}

.stat-card,
.panel-block,
.auth-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stat-card {
  min-height: 112px;
  display: grid;
  align-content: space-between;
  padding: 18px;
}

.stat-card > span,
.panel-heading > span:not(.inline-actions),
.inline-actions > span,
.muted {
  color: var(--muted);
}

.stat-card strong {
  font-size: 1.75rem;
  line-height: 1;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.panel-block,
.auth-panel {
  padding: 22px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.panel-heading > * {
  min-width: 0;
}

.panel-heading h2,
.model-setting h2 {
  margin: 0;
  font-size: 1.1rem;
}

.inline-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
}

.big-number {
  margin: 0;
  color: var(--ink);
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
}

.auth-panel,
.inline-form,
.settings-list {
  display: grid;
  gap: 14px;
}

.optional-invite {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.optional-invite summary {
  color: var(--teal);
  font-size: 0.95rem;
}

.optional-invite label {
  margin-top: 12px;
}

.auth-panel,
.auth-panel label,
.auth-panel input {
  min-width: 0;
}

label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-weight: 800;
}

/* display:grid acima vence o [hidden] { display:none } do UA stylesheet (origem author > user-agent
   independente de especificidade) — sem isto, <label hidden> fica visível. */
label[hidden] {
  display: none;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 9px 11px;
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  outline: 3px solid color-mix(in srgb, var(--teal) 22%, transparent);
}

textarea {
  min-height: 86px;
  resize: vertical;
}

.check-row,
.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input,
.switch-row input {
  width: 18px;
  min-height: 18px;
  flex: none;
}

.check-row span {
  min-width: 0;
}

.check-row a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.form-alt,
.form-message,
.empty-state {
  margin: 0;
}

.security-note {
  margin: 12px 0 0;
}

.form-message:empty {
  display: none;
}

.form-alt a {
  color: var(--teal);
  font-weight: 900;
}

.form-message {
  color: var(--amber);
  font-weight: 800;
}

.form-message.is-success {
  color: var(--green);
}

.form-message.is-muted {
  color: var(--muted);
  font-weight: 700;
}

.google-auth-slot {
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  display: grid;
  align-items: center;
  overflow: hidden;
}

.google-auth-slot > div {
  max-width: 100%;
}

.google-auth-slot iframe {
  max-width: 100% !important;
}

.turnstile-slot {
  margin-top: 12px;
  min-width: 0;
  max-width: 100%;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.google-fallback {
  width: 100%;
  min-height: 42px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  background: #fff;
  color: #1f1f1f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  box-shadow: none;
}

.google-fallback svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.google-fallback:disabled {
  cursor: not-allowed;
  opacity: 0.78;
}

.google-loading {
  color: var(--muted);
  font-weight: 800;
}

.is-hidden {
  display: none;
}

.secret-box {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  border: 1px solid color-mix(in srgb, var(--teal) 38%, var(--line));
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 14px;
}

.secret-copy {
  display: grid;
  gap: 3px;
}

.secret-copy strong {
  color: var(--ink);
}

.secret-copy span {
  color: var(--muted);
}

.secret-value {
  display: block;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  padding: 12px;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.secret-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pix-qr-image {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.key-origin-grid {
  display: grid;
  grid-template-columns: minmax(180px, 240px) repeat(2, minmax(180px, 1fr));
  gap: 12px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

.table-select {
  min-width: 150px;
  min-height: 38px;
  padding: 6px 9px;
  font-size: 0.9rem;
}

.onboarding-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.onboarding-panel {
  max-width: 980px;
}

.onboarding-heading {
  align-items: flex-start;
}

.onboarding-heading .muted {
  margin: 6px 0 0;
}

.onboarding-list {
  display: grid;
  gap: 12px;
}

.onboarding-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 14px;
}

.onboarding-step.is-open {
  border-color: color-mix(in srgb, #42bd7f 45%, var(--line));
}

.onboarding-step-index {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 1000;
}

.onboarding-step.is-open .onboarding-step-index {
  border-color: color-mix(in srgb, #42bd7f 55%, var(--line));
  color: #42bd7f;
}

.onboarding-step-index svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.onboarding-step h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.onboarding-step strong,
.onboarding-step span:not(.onboarding-step-index) {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.onboarding-step > div > span {
  color: var(--muted);
}

.onboarding-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow-y: auto;
  background: rgba(6, 11, 24, 0.72);
  padding: 24px;
}

.modal-panel {
  width: min(100%, 760px);
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.36);
}

.modal-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.modal-close {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  cursor: pointer;
}

.modal-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.modal-body {
  min-width: 0;
  overflow-y: auto;
  padding: 20px;
}

.modal-form {
  display: grid;
  gap: 14px;
}

.modal-summary {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.has-modal {
  overflow: hidden;
}

.table-wrap {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.table-wrap th {
  white-space: nowrap;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

td code {
  overflow-wrap: anywhere;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.is-success {
  border-color: color-mix(in srgb, var(--green) 38%, var(--line));
  color: var(--green);
}

.bar-list {
  display: grid;
  gap: 10px;
}

.bar-list div {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 10px;
}

.bar-list i,
.quota-progress i {
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.bar-list i {
  height: 10px;
}

.bar-list i::before {
  content: "";
  display: block;
  width: var(--w);
  height: 100%;
  background: var(--teal);
}

.bar-list b {
  text-align: right;
}

.bar-list-models div {
  grid-template-columns: 148px minmax(0, 1fr) 56px;
}

.bar-list-models span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.usage-pagination {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

#usage-table tr[data-event-id] {
  cursor: pointer;
}

#usage-table tr[data-event-id]:hover td,
#usage-table tr[data-event-id]:focus-visible td {
  background: var(--surface-soft);
}

.settings-list dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

.filters-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  gap: 14px;
}

.usage-filters {
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
  align-items: end;
}

.model-filters {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px) minmax(220px, 320px);
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.admin-tabs button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  padding: 9px 14px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.admin-tabs button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
}

.admin-tabs svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: inherit;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-pane {
  display: grid;
  gap: 16px;
}

.admin-pane[hidden] {
  display: none;
}

.admin-filters {
  align-items: end;
}

.compact-heading {
  margin-top: 8px;
}

.table-sub {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.quota-progress {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.quota-progress div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.quota-progress i {
  height: 12px;
}

.quota-progress em {
  display: block;
  height: 100%;
  background: var(--green);
}

.quota-alert {
  margin: 18px 0 0;
  border: 1px solid color-mix(in srgb, var(--amber) 45%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--amber) 14%, var(--surface));
  color: var(--ink);
  padding: 12px;
  font-weight: 800;
}

.model-settings-list {
  display: grid;
  gap: 12px;
}

.model-setting {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 0 0 16px;
}

.model-setting:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.model-setting code {
  color: var(--teal);
  font-weight: 800;
}

.compact-meta {
  margin-top: 12px;
}

.model-actions {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 140px;
}

.settings-list {
  margin: 18px 0 0;
}

.settings-list div {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.settings-list dt {
  color: var(--muted);
  font-weight: 800;
}

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

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
    height: auto;
    gap: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .app-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 680px) {
  .app-main {
    padding: 20px 16px;
  }

  .app-topbar,
  .panel-heading,
  .inline-actions,
  .modal-actions,
  .secret-box,
  .filters-row,
  .key-origin-grid,
  .model-setting,
  .settings-list div {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .app-topbar {
    justify-content: flex-start;
    gap: 16px;
  }

  .app-title-group,
  .app-actions {
    flex: 0 1 auto;
  }

  .app-user-name {
    max-width: 100%;
  }

  .app-actions {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .app-nav,
  .stat-grid,
  .panel-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 92px;
  }

  .app-user {
    max-width: calc(100% - 112px);
  }

  .app-user-name {
    max-width: 38vw;
  }

  .app-action-group {
    flex: 0 0 auto;
  }

  .inline-actions,
  .table-actions {
    justify-content: stretch;
  }

  .admin-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-tabs button {
    justify-content: center;
    width: 100%;
  }

  .inline-actions .button,
  .table-actions .button,
  .onboarding-actions .button {
    width: 100%;
  }

  .onboarding-step {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .onboarding-step .button,
  .onboarding-step .status-pill {
    grid-column: 1 / -1;
    width: 100%;
  }

  .onboarding-footer {
    justify-content: stretch;
  }

  .onboarding-footer .button {
    width: 100%;
  }

  .app-auth-shell .app-main {
    width: 100%;
    padding: 40px 16px 32px;
  }

  .app-auth-shell .app-topbar {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .app-auth-shell .app-actions {
    width: 100%;
    justify-content: stretch;
  }

  .app-auth-shell .auth-panel {
    padding: 20px;
  }

  .modal-backdrop {
    align-items: end;
    padding: 12px;
  }

  .modal-panel {
    max-height: calc(100vh - 24px);
  }

  .modal-header,
  .modal-body {
    padding: 16px;
  }

  .modal-actions .button {
    width: 100%;
  }

  .check-row {
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .table-wrap {
    overflow: visible;
  }

  .table-wrap table,
  .table-wrap thead,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap th,
  .table-wrap td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .table-wrap table {
    border-collapse: separate;
    border-spacing: 0;
  }

  .table-wrap thead {
    display: none;
  }

  .table-wrap tbody {
    display: grid;
    gap: 12px;
  }

  .table-wrap tr {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    padding: 12px;
  }

  .table-wrap td {
    display: grid;
    grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    border-bottom: 0;
    padding: 0;
  }

  .table-wrap td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1.4;
    text-transform: uppercase;
  }

  .table-wrap .table-actions-cell {
    grid-template-columns: 1fr;
  }

  .table-wrap .table-actions-cell::before {
    display: none;
  }
}

@media (max-width: 360px) {
  .app-main,
  .app-auth-shell .app-main {
    padding-left: 12px;
    padding-right: 12px;
  }

  .auth-panel,
  .app-auth-shell .auth-panel,
  .panel-block {
    padding: 16px;
  }

  .button,
  .theme-toggle {
    padding-left: 10px;
    padding-right: 10px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #060b18;
    --paper-strong: #0b1220;
    --surface: #0b1220;
    --surface-soft: #0e1626;
    --ink: #e8ecf3;
    --muted: #a3aabb;
    --line: #1d2638;
    --line-strong: #2b3650;
    --accent: #d4af37;
    --accent-hover: #e8c14a;
    --accent-pressed: #b8941e;
    --accent-contrast: #0b1220;
    --accent-soft: rgba(212, 175, 55, 0.18);
    --accent-on-dark-bg: #d4af37;
    --bg-dark: #060b18;
    --bg-darker: #0b1220;
    --on-dark: #ffffff;
    --on-dark-muted: #c8cfdc;
    --green: #57c586;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
    --focus-ring: 0 0 0 3px rgba(212, 175, 55, 0.55);
  }

  .brand-mark,
  .site-header nav .nav-cta {
    background: var(--accent);
    color: var(--accent-contrast);
    border: 1px solid var(--line);
  }

  .page-hero,
  .privacy-band,
  .pilot-band {
    background: var(--bg-dark);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #060b18;
  --paper-strong: #0b1220;
  --surface: #0b1220;
  --surface-soft: #0e1626;
  --ink: #e8ecf3;
  --muted: #a3aabb;
  --line: #1d2638;
  --line-strong: #2b3650;
  --accent: #d4af37;
  --accent-hover: #e8c14a;
  --accent-pressed: #b8941e;
  --accent-contrast: #0b1220;
  --accent-soft: rgba(212, 175, 55, 0.18);
  --accent-on-dark-bg: #d4af37;
  --bg-dark: #060b18;
  --bg-darker: #0b1220;
  --on-dark: #ffffff;
  --on-dark-muted: #c8cfdc;
  --green: #57c586;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  --focus-ring: 0 0 0 3px rgba(212, 175, 55, 0.55);
}

:root[data-theme="dark"] .brand-mark,
:root[data-theme="dark"] .site-header nav .nav-cta {
  background: var(--accent);
  color: var(--accent-contrast);
  border: 1px solid var(--line);
}

/* Painel de Controle — skin dark exclusiva do /app autenticado. Especificidade
   (0,3,0) vence o bloco :root[data-theme="dark"] acima (0,2,0) independente da
   ordem; :not(.app-auth-shell) exclui login/cadastro/termos, que usam a mesma
   #app-root mas devem continuar com o visual Reserva. Ver nota em ROADMAP.md. */
:root[data-theme="dark"] .app-shell:not(.app-auth-shell) {
  --paper: #0d1418;
  --paper-strong: #141d22;
  --surface: #141d22;
  --surface-soft: #0d1418;
  --ink: #e7f1f0;
  --muted: #7e9a98;
  --line: #587376;
  --line-strong: #6d8b8e;
  --teal: #3fa9a0;
  --teal-strong: #57c7bc;
}

:root[data-theme="dark"] .app-shell:not(.app-auth-shell) #app-eyebrow,
:root[data-theme="dark"] .app-shell:not(.app-auth-shell) #app-title,
:root[data-theme="dark"] .app-shell:not(.app-auth-shell) .stat-card strong {
  font-family: var(--font-mono);
}

:root[data-theme="dark"] .app-shell:not(.app-auth-shell) .app-main {
  background-image:
    repeating-linear-gradient(0deg, rgba(231, 241, 240, 0.035) 0, rgba(231, 241, 240, 0.035) 1px, transparent 1px, transparent 32px),
    repeating-linear-gradient(90deg, rgba(231, 241, 240, 0.035) 0, rgba(231, 241, 240, 0.035) 1px, transparent 1px, transparent 32px);
}

:root[data-theme="light"] {
  color-scheme: light;
  --paper: #fafaf7;
  --paper-strong: #f3f2ec;
  --surface: #ffffff;
  --surface-soft: #f3f2ec;
  --ink: #0f172a;
  --muted: #5a6479;
  --line: #d6d8d3;
  --line-strong: #b6b9b1;
  --accent: #8a6a1f;
  --accent-hover: #6e541a;
  --accent-pressed: #574114;
  --accent-contrast: #ffffff;
  --accent-soft: rgba(138, 106, 31, 0.14);
  --accent-on-dark-bg: #d4af37;
  --bg-dark: #060b18;
  --bg-darker: #0b1220;
  --on-dark: #ffffff;
  --on-dark-muted: #c8cfdc;
  --green: #0a6b3b;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.11);
  --focus-ring: 0 0 0 3px rgba(138, 106, 31, 0.45);
}

:root[data-theme="light"] .brand-mark,
:root[data-theme="light"] .site-header nav .nav-cta {
  background: var(--ink);
  color: var(--paper);
  border-color: transparent;
}

:root[data-theme="light"] .hero {
  color: var(--ink);
  background: var(--paper-strong);
}

:root[data-theme="light"] .hero::after {
  background:
    linear-gradient(90deg, rgba(250, 250, 247, 0.99) 0%, rgba(250, 250, 247, 0.94) 45%, rgba(250, 250, 247, 0.55) 72%, rgba(250, 250, 247, 0.16) 100%),
    linear-gradient(180deg, rgba(250, 250, 247, 0.08) 0%, rgba(250, 250, 247, 0.62) 100%);
}

:root[data-theme="light"] .hero-image-dark {
  display: none;
}

:root[data-theme="light"] .hero-image-light {
  display: block;
}

:root[data-theme="light"] .hero .eyebrow {
  color: var(--accent-hover);
}

:root[data-theme="light"] .hero-copy,
:root[data-theme="light"] .hero-metrics dt,
:root[data-theme="light"] .hero-metrics dd {
  color: var(--muted);
}

:root[data-theme="light"] .hero-metrics dd strong {
  color: var(--ink);
}

:root[data-theme="light"] .hero-metrics div {
  border-top-color: var(--line-strong);
}

:root[data-theme="light"] .hero-live-badge {
  color: var(--muted);
}

:root[data-theme="light"] .live-dot {
  background: var(--accent);
}

:root[data-theme="light"] .live-dot::after {
  border-color: var(--accent);
}

:root[data-theme="light"] .hero-actions .button-secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

:root[data-theme="light"] .page-hero {
  border-bottom: 1px solid var(--line);
  background: var(--paper-strong);
  color: var(--ink);
}

:root[data-theme="light"] .page-hero .eyebrow {
  color: var(--accent-hover);
}

:root[data-theme="light"] .page-hero p {
  color: var(--muted);
}

/* Admin · estatísticas de crescimento */
.growth-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.growth-toolbar label {
  min-width: min(260px, 100%);
}

.growth-toolbar svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.growth-tabs {
  margin-bottom: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
}

.growth-tabs button {
  flex: 0 0 auto;
}

.growth-status {
  min-height: 22px;
  margin-bottom: 14px;
  color: var(--muted);
}

.growth-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.growth-stat {
  min-width: 0;
  min-height: 124px;
  gap: 8px;
}

.growth-stat > span {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.growth-stat small {
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.35;
}

.growth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.growth-grid-wide {
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
}

.growth-span-2 {
  grid-column: span 2;
}

.growth-panel {
  min-width: 0;
  overflow: hidden;
}

.growth-panel .panel-heading {
  margin-bottom: 16px;
}

.growth-panel .panel-heading p {
  margin: 6px 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
}

.growth-chart {
  min-height: 280px;
  overflow-x: auto;
}

.growth-chart svg {
  display: block;
  width: 100%;
  min-width: 620px;
  height: auto;
}

.growth-chart .grid {
  stroke: var(--line);
  stroke-width: 1;
}

.growth-chart text {
  fill: var(--muted);
  font-size: 12px;
}

.growth-chart .series {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.growth-chart .series.web {
  stroke: var(--green);
}

.growth-chart .series.api {
  stroke: var(--accent);
}

.growth-chart .series.edge {
  stroke: var(--line-strong);
}

.growth-legend {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  color: var(--muted);
  font-size: 0.8125rem;
}

.growth-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.growth-legend span::before {
  width: 14px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.growth-legend .web {
  color: var(--green);
}

.growth-legend .api {
  color: var(--accent);
}

.growth-legend .edge {
  color: var(--muted);
}

.growth-sources {
  display: grid;
  gap: 10px;
}

.growth-source,
.growth-source-note {
  min-width: 0;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-soft);
}

.growth-source {
  grid-template-columns: minmax(0, 1fr);
}

.growth-source > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.growth-source > div:last-child {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  text-align: left;
}

.growth-source > div:last-child small {
  text-align: right;
}

.growth-source span,
.growth-source small,
.growth-source-note span {
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.growth-bars {
  display: grid;
  gap: 13px;
}

.growth-bars article {
  display: grid;
  gap: 7px;
}

.growth-bars article > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.875rem;
}

.growth-track {
  height: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.growth-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.growth-hours {
  min-height: 150px;
  display: grid;
  grid-template-columns: repeat(24, minmax(22px, 1fr));
  align-items: end;
  gap: 6px;
  overflow-x: auto;
  padding-top: 10px;
}

.growth-hours article {
  min-width: 22px;
  display: grid;
  gap: 6px;
  text-align: center;
}

.growth-hours article > div {
  height: 105px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 2px;
}

.growth-hours i {
  width: 7px;
  min-height: 2px;
  border-radius: 3px 3px 0 0;
}

.growth-hours i.web {
  background: var(--green);
}

.growth-hours i.api {
  background: var(--accent);
}

.growth-hours span {
  color: var(--muted);
  font-size: 0.75rem;
}

.growth-funnel {
  display: grid;
  gap: 13px;
}

.growth-funnel article {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(180px, 2fr) 48px;
  align-items: center;
  gap: 14px;
}

.growth-funnel article > div:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.growth-funnel span {
  color: var(--muted);
  font-size: 0.8125rem;
}

.growth-funnel b {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.growth-table th:not(:first-child),
.growth-table td:not(:first-child) {
  text-align: right;
}

.growth-table td {
  overflow-wrap: anywhere;
}

@media (max-width: 1120px) {
  .growth-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .growth-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .growth-toolbar label,
  .growth-toolbar button {
    width: 100%;
  }

  .growth-kpis,
  .growth-grid,
  .growth-grid-wide {
    grid-template-columns: 1fr;
  }

  .growth-span-2 {
    grid-column: auto;
  }

  .growth-funnel article {
    grid-template-columns: minmax(0, 1fr) 38px;
  }

  .growth-funnel article > div:first-child {
    grid-column: 1 / -1;
  }

  .growth-chart {
    min-height: 240px;
  }

  .growth-source {
    grid-template-columns: 1fr;
  }

  .growth-source > div:last-child {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .growth-source > div:last-child small {
    text-align: left;
  }
}
