.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-5) 0;
}

.brand {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-brand);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-nav a.is-active {
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.btn--disabled,
span.btn--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.doc-locale-heading {
  margin: var(--space-7) 0 var(--space-4);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-text-muted);
}

.language-switcher a.is-active {
  font-weight: 700;
  text-decoration: underline;
}

.language-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}


.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-5);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.15rem;
  text-decoration: none;
  font-weight: 500;
  font-size: var(--text-base);
  color: var(--color-text);
}

.site-nav a:hover {
  text-decoration: underline;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.theme-toggle select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  /* left = right outer pad; extra end room = icon + gap before chevron */
  padding: 0.4rem 2.55rem 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background-color: var(--color-panel-capsule);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23000000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 0.75rem;
  color: var(--color-text);
}

html[data-theme="dark"] .theme-toggle select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23E6E6E6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23E6E6E6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}

.site-footer {
  margin-top: auto;
  padding: var(--space-7) 0;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.site-footer__inner {
  text-align: center;
}

.site-footer__inner > p {
  margin: 0;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-5);
  margin-top: var(--space-4);
}

.site-footer__links a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--color-text);
  text-decoration: underline;
}

.hero {
  padding: var(--space-8) 0;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: var(--space-6);
  background: var(--color-surface);
  color: var(--color-text);
}

.hero .brand-hero,
.hero h1.brand-hero {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.03em;
  max-width: none;
}

.hero > p {
  margin: 0;
  max-width: 40ch;
  font-size: var(--text-md);
  font-weight: 400;
  color: var(--color-text-muted);
  line-height: var(--leading-prose);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
}

.btn,
a.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  background: var(--color-primary);
  color: var(--color-on-primary);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: var(--text-base);
  text-decoration: none;
  line-height: 1.25;
}

.btn:hover,
a.btn:hover {
  opacity: 0.88;
}

.btn--ghost,
a.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn--ghost:hover,
a.btn--ghost:hover {
  background: var(--color-panel-capsule);
  opacity: 1;
}

.doc-card-list {
  display: grid;
  gap: var(--space-5);
  margin: var(--space-6) 0 var(--space-8);
}

a.doc-card,
.doc-card {
  display: block;
  padding: var(--space-inset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-container-low);
  text-decoration: none;
  color: inherit;
  transition: border-color 120ms ease, background-color 120ms ease;
}

a.doc-card:hover {
  border-color: var(--color-primary);
  background: var(--color-surface-container-high);
}

.doc-card h2 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--color-text);
}

.doc-card p {
  margin: 0 0 var(--space-3);
  color: var(--color-text-muted);
}

.doc-card .doc-meta {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
