* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg) 0%, #0a0f26 100%);
}

/* mídia sempre fluida */
img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2 {
  margin: 0 0 12px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

/* título do topo com tamanho fluido */
h1 {
  font-weight: 800;
  font-size: clamp(18px, 4.8vw, 32px);
}

a {
  color: var(--blue-300);
}

.logo-fake {
  font-weight: 800;
  letter-spacing: .5px;
  color: var(--blue-300);
  white-space: nowrap;
}

/* container mobile-first com padding lateral fluido */
.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(12px, 4vw, 24px);
}

.site-header {
  padding-block: 16px;
  border-bottom: 1px solid var(--border-soft);
}
.header__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand  controls"
    "title  title";
  align-items: center;
  gap: 10px 12px;
}
.header__inner .icon-btn {
  margin-left: auto;
}

.header__inner .logo-fake {
  grid-area: brand;
}

.header__inner h1 {
  grid-area: title;
}

.layout-controls {
  grid-area: controls;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.card {
  background: var(--glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  min-width: 0;
}

.btn {
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  background: #19264a;
  color: var(--text);
  border: 1px solid var(--border);
  min-width: 0;
}

.btn--primary {
  background: var(--blue-500);
  border: none;
  color: #06102a;
  font-weight: 700;
}

.btn--ghost {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.site-footer {
  padding: 18px 0;
  border-top: 1px solid var(--border-soft);
  margin-top: 24px;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* ajustes finos em telas muito estreitas */
@media (max-width: 380px) {
  .card {
    padding: 14px;
    border-radius: 12px;
  }

  .layout-controls {
    justify-content: flex-start;
  }
}
