/* Public pages: enrol, privacy, update (no inline styles — CSP style-src 'self'). */

.page-public {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-5) var(--sp-4);
  padding-bottom: calc(var(--sp-5) + env(safe-area-inset-bottom));
}

.page-public-card {
  width: 100%;
  max-width: 440px;
  background: rgb(var(--c-surface));
  border: 0;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-1);
  padding: 32px 28px;
}

.page-public-card .page-title {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: rgb(var(--c-ink));
}

.page-public-card .page-subtitle {
  margin: 0 0 var(--sp-5);
  font-size: var(--fs-md);
  color: rgb(var(--c-mute));
}

.page-brand { gap: 12px; }
.page-brand .brand-logo { width: 34px; height: 34px; border-radius: 10px; object-fit: contain; background: #fff; box-shadow: inset 0 0 0 1px rgb(var(--c-line)); }
.page-brand .brand-mono { width: 34px; height: 34px; border-radius: 10px; background: rgb(var(--c-primary)); color: rgb(var(--c-on-primary)); box-shadow: none; font-size: 14px; }

/* HVOC V3: white top bar with the brand mark (same look as the clinic header) */
.page-topbar {
  display: flex; align-items: center; gap: 14px;
  min-height: 60px; padding: env(safe-area-inset-top) 22px 0;
  background: rgb(var(--c-surface)); border-bottom: 1px solid rgb(var(--c-line));
}
.page-topbar .page-brand { margin: 0; min-width: 0; }
.page-brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; font-size: 19px; font-weight: 700; color: rgb(var(--c-ink)); }
.page-brand-text small { font-size: var(--fs-sm); font-weight: 500; color: rgb(var(--c-mute)); }
.page-topbar + .page-public { min-height: calc(100vh - 61px); min-height: calc(100dvh - 61px); }
.page-public-card .btn, .page-public-wide .btn { min-height: 48px; font-size: var(--fs-lg); }
.page-public-head { margin: 8px 0 20px; }
.page-public-head .page-subtitle { margin: 6px 0 0; font-size: var(--fs-lg); color: rgb(var(--c-mute)); }
.page-public-wide {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: var(--sp-5) var(--sp-4);
  padding-bottom: calc(var(--sp-5) + env(safe-area-inset-bottom));
}

.page-public-wide .page-title {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: rgb(var(--c-ink));
}

.enrol-input {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.24em;
  min-height: 52px;
  text-align: center;
  text-transform: uppercase;
}

.enrol-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.privacy-block {
  background: rgb(var(--c-surface));
  border: 1px solid rgb(var(--c-line));
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
}

.privacy-block { border: 0; border-radius: var(--radius-card); padding: 22px 24px; }
.privacy-block h2 {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: rgb(var(--c-ink));
}

.privacy-block h3 {
  margin: var(--sp-3) 0 var(--sp-2);
  font-size: var(--fs-md);
  font-weight: 700;
  color: rgb(var(--c-ink));
}

.privacy-text {
  white-space: pre-wrap;
  max-width: 72ch;
  font-size: var(--fs-lg);
  line-height: 1.65;
  color: rgb(var(--c-ink));
  margin: 0;
}

.privacy-contact dt {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: rgb(var(--c-mute));
  margin-top: var(--sp-2);
}
.privacy-contact dd {
  margin: 2px 0 0;
  font-size: var(--fs-md);
  color: rgb(var(--c-ink));
}

.privacy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.privacy-table th,
.privacy-table td {
  text-align: left;
  padding: 8px var(--sp-2);
  border-bottom: 1px solid rgb(var(--c-line));
}
.privacy-table th {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgb(var(--c-mute));
  background: rgb(var(--c-surface-2));
}

.privacy-list {
  margin: 0;
  padding-left: 1.25em;
  font-size: var(--fs-md);
  line-height: 1.55;
}
.privacy-list li + li { margin-top: 4px; }

.privacy-meta {
  font-size: var(--fs-xs);
  color: rgb(var(--c-mute));
  margin: var(--sp-4) 0 0;
}

.privacy-fallback {
  padding: var(--sp-4);
  background: rgb(var(--c-info-tint));
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  color: rgb(var(--c-info-ink));
  font-size: var(--fs-md);
  line-height: 1.5;
}
.privacy-fallback[role="alert"] { background: rgb(var(--c-danger-tint)); color: rgb(var(--c-danger-ink)); }

/* update.html */
.update-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  margin: 0;
  padding: var(--sp-5);
  font-family: var(--font);
  background: rgb(var(--c-bg));
  color: rgb(var(--c-ink));
  text-align: center;
}
.update-page .brand-logo { width: 32px; height: 32px; border-radius: 8px; object-fit: contain; background: #fff; }
.update-page .brand-logo[hidden], .update-page .brand-mono[hidden] { display: none; }
.update-page .brand-mono { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgb(var(--c-primary)); color: rgb(var(--c-on-primary)); font-size: 13px; font-weight: 700; }

.update-page p {
  margin: 0;
  font-size: var(--fs-lg);
  font-weight: 600;
}

.update-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgb(var(--c-primary) / 0.2);
  border-top-color: rgb(var(--c-primary));
  border-radius: 50%;
  animation: update-spin 0.8s linear infinite;
}

@keyframes update-spin {
  to { transform: rotate(360deg); }
}

.update-slow {
  font-size: var(--fs-md);
  font-weight: 600;
  color: rgb(var(--c-primary));
  text-decoration: none;
  background: rgb(var(--c-surface));
  border: 1px solid rgb(var(--c-line));
  border-radius: var(--radius-pill);
  cursor: pointer;
  min-height: 44px;
  padding: 0 20px;
}
.update-slow[hidden] { display: none !important; }
