/* Each pair is light-dark(light, dark); the theme toggle only flips
   color-scheme on <html>, so no palette is written twice. */
:root {
  color-scheme: light dark;
  --bg: light-dark(#fafaf9, #111318);
  --surface: light-dark(#ffffff, #181a20);
  --text: light-dark(#111318, #fafaf9);
  --muted: light-dark(#6b6b71, #9b9ba1);
  --line: light-dark(#e4e4e1, #2a2c33);
  --veil: light-dark(rgba(17, 19, 24, 0.06), rgba(250, 250, 249, 0.08));
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background: var(--bg);
  color: var(--text);
  font:
    16px/1.6 system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
}

main {
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px 32px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.symbol {
  flex: none;
  width: 48px;
  height: 48px;
}

h1 {
  margin: 0 0 4px;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0;
  color: var(--muted);
}

h2 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

section + section {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 20px;
}

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

dd {
  margin: 0;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

.product {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.product strong {
  display: block;
}

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

.controls {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 6px;
}

.theme-toggle {
  display: flex;
  padding: 5px 7px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

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

.theme-toggle svg {
  width: 16px;
  height: 16px;
}

/* Without JS there is nothing to flip, and the system theme still applies. */
html:not(.js) .theme-toggle {
  display: none;
}

.languages {
  display: flex;
  gap: 2px;
}

.flag {
  display: flex;
  padding: 5px 7px;
  border-radius: 999px;
  opacity: 0.45;
  transition: opacity 0.2s ease;
}

.flag:hover {
  opacity: 1;
}

.flag.active {
  opacity: 1;
  background: var(--veil);
}

.flag svg {
  display: block;
  width: 20px;
  height: 14px;
  border-radius: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

footer {
  margin-top: 32px;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 480px) {
  main {
    padding: 28px 20px;
  }

  header {
    flex-direction: column-reverse;
    gap: 12px;
  }

  .controls {
    align-self: flex-end;
    margin-top: 0;
  }

  h1 {
    font-size: 24px;
  }

  .symbol {
    width: 40px;
    height: 40px;
  }

  dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  dd + dt {
    margin-top: 10px;
  }
}
