:root {
  color-scheme: light dark;
}
body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
    sans-serif;
  padding: 2rem;
  line-height: 1.6;
}
header {
  max-width: 960px;
  margin: 0 auto 1.5rem auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
h1 {
  font-size: 1.5rem;
  margin: 0;
}
h1 a {
  color: inherit;
  text-decoration: none;
}
h1 a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.theme-toggle {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #111827;
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
}
.theme-toggle:hover {
  opacity: 0.9;
}
.nav {
  display: flex;
  gap: 1rem;
}
.nav a[aria-current="page"] {
  font-weight: 600;
}
.page {
  max-width: 960px;
  margin: 0 auto;
}
.section {
  margin-bottom: 1.25rem;
}
.footer {
  max-width: 960px;
  margin: 2rem auto 0 auto;
}
.form .field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}
.form input,
.form textarea {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  background: white;
  color: inherit;
}
.form .actions {
  margin-top: 0.5rem;
}
.form button {
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}
.form button:hover {
  opacity: 0.9;
}
.hidden {
  display: none;
}
.container {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  background: white;
}
.dark .card {
  background: #0b0b0b;
  border-color: #2a2a2a;
}
.muted {
  color: #6b7280;
  font-size: 0.9rem;
}
.row {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  flex-wrap: wrap;
}
.label {
  color: #6b7280;
  min-width: 120px;
}
.val {
  font-weight: 600;
}
.error {
  color: #dc2626;
}
a {
  color: #2563eb;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
.badges {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 0.25rem 0 0.5rem;
}
.badges img {
  height: 20px;
}
.chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}
.chip {
  padding: 2px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #111827;
  border: 1px solid #e5e7eb;
  font-size: 0.85rem;
}
a.chip {
  text-decoration: none;
}
a.chip:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media (prefers-color-scheme: dark) {
  .chip {
    background: #161616;
    color: #e5e7eb;
    border-color: #2a2a2a;
  }
}
@media (prefers-color-scheme: dark) {
  body {
    background: #0b0b0b;
    color: #e5e7eb;
  }
  .muted,
  .label {
    color: #9ca3af;
  }
}

/* Explicit theme overrides via data attribute */
:root[data-theme="dark"] {
  color-scheme: dark;
}
:root[data-theme="dark"] body {
  background: #0b0b0b;
  color: #e5e7eb;
}
:root[data-theme="dark"] .muted,
:root[data-theme="dark"] .label {
  color: #9ca3af;
}
:root[data-theme="dark"] .card {
  background: #0b0b0b;
  border-color: #2a2a2a;
}
:root[data-theme="dark"] .chip {
  background: #161616;
  color: #e5e7eb;
  border-color: #2a2a2a;
}

/* Consent banner */
.consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  z-index: 1000;
  padding: 0.75rem;
}
.consent-banner .consent-inner {
  max-width: 960px;
  width: min(960px, 100%);
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
}
.consent-banner p {
  margin: 0;
}
.consent-actions {
  display: flex;
  gap: 0.5rem;
}
.consent-actions button {
  border-radius: 8px;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
}
.consent-actions .accept {
  background: #16a34a;
  border: none;
  color: white;
}
.consent-actions .accept:hover,
.consent-actions .decline:hover {
  opacity: 0.9;
}

:root[data-theme="dark"] .consent-banner .consent-inner {
  background: #0b0b0b;
  color: #e5e7eb;
  border-color: #2a2a2a;
}
:root[data-theme="dark"] .consent-actions button {
  background: #111214;
  color: #e5e7eb;
  border-color: #2a2a2a;
}
