:root {
  --background: #FFFFFF;
  --ink: #18181D;
  --secondary: #5C5C6B;
  --rule: rgba(0, 0, 0, 0.10);
}

/* Dark follows the system unless the visitor picked a look with the appearance button. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background: #000000;
    --ink: #F2F2F6;
    --secondary: #9A9AAB;
    --rule: rgba(255, 255, 255, 0.16);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --background: #000000;
  --ink: #F2F2F6;
  --secondary: #9A9AAB;
  --rule: rgba(255, 255, 255, 0.16);
  color-scheme: dark;
}

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

.on-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .on-dark { display: block; }
  :root:not([data-theme="light"]) .on-light { display: none; }
}
:root[data-theme="dark"] .on-dark { display: block; }
:root[data-theme="dark"] .on-light { display: none; }

/* The app's System swatch: a ring, half filled. */
.appearance {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.appearance:hover { opacity: 0.7; }
.appearance:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 50%; }

* { box-sizing: border-box; }

html { background: var(--background); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.7; }

.wrap { width: 100%; max-width: 1040px; padding-inline: 24px; }

header.wrap {
  margin-inline: auto;
  padding-top: 26px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  align-items: start;
}
.home {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.06em;
}
.header-walker {
  width: 116px;
  height: 154px;
  justify-self: center;
  background: var(--ink);
  mask: url("images/header-walker.svg") center / contain no-repeat;
}
header .appearance { justify-self: end; }
footer.wrap { margin-inline: auto; }

footer {
  margin-top: clamp(64px, 8vw, 96px);
  padding-top: 32px;
  padding-bottom: 48px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  color: var(--secondary);
  font-size: 15px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.privacy { color: var(--ink); }
footer a { font-weight: 500; padding: 12px 0; }
.languages { justify-self: end; display: flex; }
.languages button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  background: none;
  color: var(--secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  cursor: pointer;
}
.languages button[aria-pressed="true"] { color: var(--ink); }
.languages button:hover { opacity: 0.7; }
.languages button:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; border-radius: 8px; }

@media (max-width: 640px) {
  footer { grid-template-columns: 1fr; justify-items: center; text-align: center; padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .languages { justify-self: center; }
}
