:root {
  color-scheme: light;
  --ink: #251c2b;
  --ink-soft: #473d4d;
  --muted: #675e6c;
  --paper: #fbf8f4;
  --paper-deep: #f4eee8;
  --surface: #ffffff;
  --night: #1d1724;
  --night-soft: #2a2132;
  --line: rgba(37, 28, 43, .14);
  --line-inverse: rgba(255, 250, 247, .18);
  --violet: #7048c7;
  --violet-soft: #e9e1fb;
  --coral: #f06b7b;
  --coral-strong: #b52f47;
  --orange: #a64e10;
  --max-width: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  scroll-padding-top: 1.5rem;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.6;
}

a { color: inherit; }

a:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 4px;
}

img {
  max-width: 100%;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 1rem;
  left: 1rem;
  padding: .75rem 1rem;
  color: #fff;
  background: var(--night);
  border-radius: .7rem;
  transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); }

.site-shell {
  width: min(100%, 1500px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: clip;
}

.site-header,
.site-footer,
.private-preview-banner,
.download-page,
.legal-document {
  width: min(calc(100% - 3rem), var(--max-width));
  margin-inline: auto;
}

.private-preview-banner {
  display: flex;
  align-items: baseline;
  gap: .5rem 1rem;
  margin-top: 1rem;
  padding: .9rem 1rem;
  color: #4c3111;
  border: 1px solid #c77a29;
  border-radius: 1rem;
  background: #fff0d8;
  font-size: .92rem;
}

.private-preview-banner strong { flex: 0 0 auto; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 6.5rem;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.brand img {
  display: block;
  width: 7.25rem;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  font-size: .94rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .62rem .85rem;
  color: var(--muted);
  border-radius: 999px;
  text-decoration: none;
  transition: color .2s ease, background-color .2s ease, transform .2s ease;
}

.site-nav a:hover {
  color: var(--ink);
  background: rgba(112, 72, 199, .08);
  transform: translateY(-1px);
}

.site-nav .nav-status {
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .72);
}

h1,
h2,
h3,
p { margin-top: 0; }

h1,
h2,
h3 {
  font-weight: 700;
  letter-spacing: -.055em;
  line-height: 1.02;
}

h1 {
  max-width: 760px;
  margin: 0 0 1.75rem;
  font-size: clamp(3.1rem, 5vw, 4.5rem);
}

h1 > span {
  display: block;
  color: var(--violet);
}

h2 {
  font-size: clamp(2.35rem, 4.6vw, 4.6rem);
}

.download-lead {
  max-width: 630px;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.8vw, 1.35rem);
  line-height: 1.6;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  min-height: 48px;
  padding: .85rem 1.3rem;
  border-radius: 999px;
  font-weight: 780;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

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

.button-primary {
  color: var(--ink);
  background: var(--coral);
  box-shadow: 0 14px 34px rgba(181, 47, 71, .18);
}

.button-primary:hover {
  background: #f27b89;
  box-shadow: 0 18px 38px rgba(181, 47, 71, .24);
}

.button-secondary {
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .72);
}

.button-secondary:hover { background: #fff; }

.button-dark {
  margin-top: 1rem;
  color: #fff;
  background: var(--night);
}

.download-page {
  min-height: calc(100vh - 15rem);
  padding-block: 6.5rem 8rem;
}

.download-page h1 { max-width: 880px; }

.download-panel {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  max-width: 920px;
  margin-top: 4rem;
  padding: 2.15rem;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: linear-gradient(135deg, rgba(112, 72, 199, .12), rgba(240, 107, 123, .12));
}

.download-panel h2 {
  max-width: 490px;
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 3vw, 2.9rem);
}

.download-panel p:last-child {
  max-width: 540px;
  margin: 0;
  color: var(--muted);
}

.download-note {
  max-width: 690px;
  margin-top: 1.5rem;
  color: var(--muted);
}

.download-note p { margin: 0; }

.legal-document {
  padding-block: 5rem 8rem;
}

.legal-header {
  max-width: 900px;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line);
}

.document-context {
  margin-bottom: .65rem;
  color: var(--coral-strong);
  font-size: .95rem;
  font-weight: 700;
}

.legal-header h1 {
  margin-top: .65rem;
  font-size: clamp(2.8rem, 6vw, 5.5rem);
}

.legal-lead {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.7vw, 1.3rem);
  line-height: 1.65;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.2rem;
  margin: 1.8rem 0 0;
  color: var(--muted);
  font-size: .88rem;
}

.legal-review {
  max-width: 900px;
  margin: 2rem 0 0;
  padding: 1.15rem 1.25rem;
  color: #4c3111;
  border: 1px solid #c77a29;
  border-radius: 1rem;
  background: #fff0d8;
}

.legal-review strong {
  display: block;
  margin-bottom: .35rem;
}

.legal-review p { margin: 0; }

.legal-toc {
  max-width: 900px;
  margin-block: 2.5rem 4rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, .68);
}

.legal-toc h2 {
  margin: 0 0 1rem;
  font-size: 1rem;
  letter-spacing: -.01em;
  line-height: 1.25;
}

.legal-toc ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem 2rem;
  margin: 0;
  padding-left: 1.4rem;
}

.legal-toc a,
.legal-section a,
.footer-legal a {
  text-underline-offset: .25em;
}

.legal-section {
  max-width: 900px;
  padding-block: 2rem;
  border-top: 1px solid var(--line);
}

.legal-section:first-of-type { border-top: 0; }

.legal-section h2 {
  margin-bottom: 1.35rem;
  font-size: clamp(1.75rem, 3vw, 2.65rem);
  letter-spacing: -.045em;
  line-height: 1.08;
}

.legal-section h3 {
  margin: 1.8rem 0 .75rem;
  font-size: 1.18rem;
  letter-spacing: -.02em;
  line-height: 1.3;
}

.legal-section p,
.legal-section li {
  color: var(--muted);
  line-height: 1.72;
}

.legal-section li + li { margin-top: .55rem; }

.legal-section strong { color: var(--ink); }

.legal-table-wrap {
  margin-block: 1.2rem;
  overflow-x: auto;
}

.legal-section table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  color: var(--muted);
  font-size: .92rem;
}

.legal-section th,
.legal-section td {
  padding: .9rem;
  text-align: left;
  vertical-align: top;
  border: 1px solid var(--line);
}

.legal-section th {
  color: var(--ink);
  background: rgba(112, 72, 199, .06);
}

.manual-value {
  color: #8e3e0a;
  font-weight: 750;
}

.site-footer {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  min-height: 8rem;
  padding-block: 1.4rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: .85rem;
}

.site-footer img {
  flex: 0 0 auto;
  width: 5.75rem;
  height: auto;
}

.footer-copy p { margin: 0; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem 1rem;
  margin-top: .35rem;
  font-size: .78rem;
}

.site-footer a { color: var(--ink); }

.site-footer .language-link {
  min-height: 44px;
  margin-left: auto;
  padding-block: .7rem;
  text-underline-offset: .3em;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 820px) {
  .site-header {
    flex-wrap: wrap;
    padding-block: 1.1rem;
  }

  .site-nav {
    width: 100%;
    order: 2;
  }

  .site-nav a {
    flex: 1 1 0;
    justify-content: center;
    text-align: center;
  }

  .download-panel { align-items: start; flex-direction: column; }

  .legal-toc ol { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .site-header,
  .site-footer,
  .private-preview-banner,
  .download-page,
  .legal-document {
    width: min(calc(100% - 2rem), var(--max-width));
  }

  .private-preview-banner {
    align-items: start;
    flex-direction: column;
  }

  .site-header { min-height: 5.5rem; }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .3rem;
    font-size: .78rem;
  }

  .site-nav a {
    min-width: 0;
    padding-inline: .45rem;
    line-height: 1.2;
  }

  h1 { font-size: clamp(2.75rem, 13.5vw, 3.85rem); }

  h2 { font-size: clamp(2.2rem, 11vw, 3.45rem); }

  .download-page { padding-block: 4rem 6rem; }

  .download-panel { margin-top: 2.5rem; padding: 1.35rem; }

  .site-footer {
    align-items: start;
    flex-wrap: wrap;
  }

  .footer-copy { flex-basis: calc(100% - 7rem); }

  .site-footer .language-link {
    width: 100%;
    margin-left: 0;
  }
}

.page-invitation [hidden] { display: none !important; }

.invitation-qr { display: flex; align-items: center; gap: 2rem; margin-top: 2rem; }
#invitation-qr-image { flex: 0 0 224px; }
#invitation-qr-image svg { display: block; width: 224px; height: 224px; }
.invitation-qr h2 { font-size: 1.4rem; }
@media (max-width: 600px) { .invitation-qr { flex-direction: column; align-items: start; } }
