:root {
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --link: #0369a1;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  overscroll-behavior-x: none;
}

html,
body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

body {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y pinch-zoom;
}

/* ——— Home ——— */

.page-shell {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  padding: max(32px, env(safe-area-inset-top, 0px))
    max(24px, env(safe-area-inset-right, 0px))
    max(28px, env(safe-area-inset-bottom, 0px))
    max(24px, env(safe-area-inset-left, 0px));
}

.landing {
  width: 100%;
  max-width: 36rem;
  min-width: 0;
  margin-inline: auto;
  box-sizing: border-box;
  text-align: center;
  overflow-x: hidden;
}

.landing--hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-width: 0;
}

/* Flex min-width:auto otherwise lets text overflow horizontally on small screens */
.landing--hero > * {
  min-width: 0;
  max-width: 100%;
}

.logo {
  width: 120px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 28px;
  object-fit: contain;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
  margin-bottom: 28px;
  display: block;
}

h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  line-height: 1.2;
  max-width: 100%;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.lead {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
  max-width: 42ch;
  width: 100%;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
  overflow-wrap: break-word;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  align-content: center;
  gap: 0.125rem 0.25rem;
  width: 100%;
  max-width: 36rem;
  min-width: 0;
  margin-inline: auto;
  box-sizing: border-box;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
  padding-top: 8px;
  overflow-x: hidden;
}

.site-footer a {
  color: var(--link);
  text-decoration: none;
  display: inline-block;
  padding: 0.5rem 0.35rem;
  min-height: 44px;
  line-height: 1.5;
  box-sizing: border-box;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-sep {
  margin: 0 0.5rem;
  color: var(--border);
  user-select: none;
}

/* ——— Legal page ——— */

.page-legal {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  padding: max(24px, env(safe-area-inset-top, 0px))
    max(24px, env(safe-area-inset-right, 0px))
    max(24px, env(safe-area-inset-bottom, 0px))
    max(24px, env(safe-area-inset-left, 0px));
}

.legal-doc {
  max-width: 36rem;
  margin: 0 auto;
  text-align: center;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.back-link {
  margin: 0 0 1.25rem;
  text-align: left;
  font-size: 0.9rem;
}

.back-link a {
  color: var(--link);
  text-decoration: none;
  display: inline-block;
  padding: 0.5rem 0;
  min-height: 44px;
}

.back-link a:hover {
  text-decoration: underline;
}

.legal-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
  letter-spacing: -0.02em;
}

.subhead {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.65rem;
}

.disclosure,
.terms {
  text-align: center;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.legal-doc > .disclosure {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.disclosure p,
.terms-body p {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  color: var(--text);
}

.disclosure p:last-child,
.terms-body p:last-child {
  margin-bottom: 0;
}

.terms-body {
  color: var(--text);
}

.terms-body strong {
  font-weight: 600;
}

.site-footer--inline {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
