:root {
  color-scheme: light;
  --bg: #f4efe6;
  --panel: rgba(255, 255, 255, 0.76);
  --text: #14261e;
  --muted: #53645d;
  --accent: #0f8a6d;
  --accent-dark: #0a5a48;
  --border: rgba(20, 38, 30, 0.12);
  --shadow: 0 24px 70px rgba(20, 38, 30, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", Avenir, Montserrat, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 138, 109, 0.18), transparent 32%),
    radial-gradient(circle at bottom right, rgba(255, 164, 118, 0.22), transparent 28%),
    linear-gradient(160deg, #fcfaf7 0%, var(--bg) 100%);
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  width: min(720px, 100%);
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.card-wide {
  width: min(1100px, 100%);
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  line-height: 0.95;
  color: var(--text);
}

dd,
dd a,
code {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

dd a {
  text-decoration: none;
}

dd a:hover {
  text-decoration: underline;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  transition:
    transform 140ms ease,
    background-color 140ms ease,
    border-color 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--accent);
  color: #fff;
}

.button.secondary {
  border-color: var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.6);
}

.button.secondary.is-disabled {
  opacity: 0.56;
  pointer-events: none;
}

.qr-block {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  align-items: center;
  margin: 0 0 28px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--border);
}

.qr {
  width: 160px;
  height: 160px;
  display: block;
  border-radius: 18px;
  background: white;
}

.qr-copy {
  display: grid;
}

code {
  display: block;
  padding: 14px 16px;
  overflow-wrap: anywhere;
  border-radius: 16px;
  background: rgba(20, 38, 30, 0.05);
  color: var(--text);
}

.pdf-shell {
  overflow: hidden;
  min-height: 72vh;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
}

.pdf-frame {
  width: 100%;
  height: 72vh;
  border: 0;
  display: block;
}

.legal {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
}

.legal-updated {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.98rem;
}

.legal-section + .legal-section {
  margin-top: 28px;
}

.legal h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
  line-height: 1.15;
}

.legal p,
.legal li {
  color: var(--text);
  line-height: 1.65;
  font-size: 1rem;
}

.legal p {
  margin: 0 0 14px;
}

.legal ul {
  margin: 0 0 14px 20px;
  padding: 0;
}

.legal-link {
  color: var(--accent-dark);
  text-decoration: none;
}

.legal-link:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .card {
    padding: 24px;
    border-radius: 24px;
  }

  .qr-block {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .pdf-shell,
  .pdf-frame {
    min-height: 68vh;
    height: 68vh;
  }

  .legal {
    padding: 20px;
  }
}
