:root {
  --bg: #f4efe6;
  --ink: #1a1916;
  --space-4: 4px;
  --space-8: 8px;
  --space-16: 16px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;
  --space-64: 64px;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  background: var(--bg);
}

body {
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-48);
  padding: var(--space-32);
}

img {
  display: block;
  width: min(22rem, 100%);
  height: auto;
}

nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-32);
  width: min(18rem, 100%);
}

article {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  min-height: 44px;
  padding: var(--space-8) var(--space-16);
  border-radius: 4px;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.open svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.open.primary {
  background: var(--ink);
  color: var(--bg);
}

.open.primary:hover,
.open.primary:focus-visible {
  background: #000;
}

.open.secondary {
  border: 1px solid var(--ink);
  color: var(--ink);
}

.open.secondary:hover,
.open.secondary:focus-visible {
  background: var(--ink);
  color: var(--bg);
}

button {
  appearance: none;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  min-height: 44px;
  padding: var(--space-8);
  cursor: pointer;
  user-select: all;
}

button:hover,
button:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

button:disabled {
  cursor: default;
  text-decoration: none;
}

.open:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

@media (min-width: 40rem) {
  img {
    width: min(28rem, 100%);
  }

  nav {
    flex-direction: row;
    width: auto;
    gap: var(--space-48);
  }

  article {
    width: 14rem;
  }
}
