/* Remote Healing Anonymous — web homepage
   Palette matched to the Android app StyleSheets. */

:root {
  --bg: #F4F1EA;
  --bg-elevated: #FFFFFF;
  --ink: #1C2B27;
  --ink-soft: #3E524C;
  --muted: #7A847F;
  --primary: #1F4D45;
  --primary-hover: #173B35;
  --border: #D5D0C6;
  --danger: #8C3A32;
  --badge: #C0392B;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 10px 30px rgba(28, 43, 39, 0.08);
  --shadow-sm: 0 2px 10px rgba(28, 43, 39, 0.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --header-h: 68px;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--primary-hover);
}

:focus-visible {
  outline: 3px solid #3B8F7F;
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  background: var(--primary);
  color: var(--bg);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 241, 234, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-logo {
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.brand-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}

.brand-sub {
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-desktop {
  display: none;
  gap: 1.25rem;
  margin-left: 1.5rem;
}

.nav-desktop a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  text-underline-offset: 0.28em;
  text-decoration-thickness: 1.5px;
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}

.nav-desktop a:hover,
.nav-desktop a:focus-visible {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: var(--primary);
}

.header-text-link {
  text-decoration: none !important;
  text-underline-offset: 0.28em;
  text-decoration-thickness: 1.5px;
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease), background 0.2s var(--ease);
}

.header-text-link:hover,
.header-text-link:focus-visible {
  text-decoration: underline !important;
  text-decoration-color: var(--primary);
  color: var(--primary);
}

.nav-mobile a {
  text-underline-offset: 0.28em;
  text-decoration-thickness: 1.5px;
}

.nav-mobile a:hover,
.nav-mobile a:focus-visible {
  text-decoration: underline;
  text-decoration-color: var(--primary);
}

@media (prefers-reduced-motion: reduce) {
  .nav-desktop a,
  .header-text-link {
    transition: none;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: auto;
}

.header-actions .header-login,
.header-actions .header-register {
  display: none;
}

.lang-switch {
  position: relative;
}

.lang-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-elevated);
  border: 1px solid var(--primary);
  color: var(--primary);
  border-radius: 12px;
  min-height: 40px;
  padding: 0 0.85rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.lang-button:hover {
  background: #EAE6DC;
}

.lang-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  min-width: 180px;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.lang-menu a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
}

.lang-menu a:hover,
.lang-menu [aria-selected="true"] a {
  background: var(--primary);
  color: var(--bg);
}

.lang-opt-code {
  font-weight: 700;
  font-size: 0.78rem;
  opacity: 0.85;
  min-width: 1.6rem;
}

.nav-toggle {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  position: relative;
  transition: transform 0.2s var(--ease);
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.nav-mobile {
  display: grid;
  gap: 0.25rem;
  padding: 0.5rem 1rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.nav-mobile[hidden] {
  display: none !important;
}

.nav-mobile a {
  padding: 0.85rem 0.75rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}

.nav-mobile a:hover {
  background: #EAE6DC;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  font-size: 1.02rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-sm {
  min-height: 40px;
  padding: 0.45rem 0.95rem;
  font-size: 0.92rem;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
  color: var(--bg);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-secondary:hover {
  background: rgba(31, 77, 69, 0.08);
  color: var(--primary);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border-color: transparent;
}

.btn-ghost:hover {
  background: rgba(31, 77, 69, 0.08);
  color: var(--primary);
}

.btn-ghost-light {
  background: rgba(244, 241, 234, 0.14);
  color: #F4F1EA;
  border-color: rgba(244, 241, 234, 0.45);
}

.btn-ghost-light:hover {
  background: rgba(244, 241, 234, 0.24);
  color: #fff;
}

/* Hero secondary actions — high contrast on the dark image */
.btn-hero-login {
  background: #F4F1EA;
  color: #1F4D45;
  border-color: #F4F1EA;
}

.btn-hero-login:hover {
  background: #FFFFFF;
  color: #173B35;
  border-color: #FFFFFF;
}

.btn-hero-login:focus-visible {
  outline: 3px solid #F4F1EA;
  outline-offset: 3px;
}

.btn-hero-register {
  background: rgba(12, 24, 22, 0.45);
  color: #F4F1EA;
  border-color: rgba(244, 241, 234, 0.85);
  backdrop-filter: blur(8px);
}

.btn-hero-register:hover {
  background: rgba(12, 24, 22, 0.65);
  color: #FFFFFF;
  border-color: #FFFFFF;
}

.btn-hero-register:focus-visible {
  outline: 3px solid #F4F1EA;
  outline-offset: 3px;
}

/* Hero */
.hero {
  position: relative;
  min-height: min(78vh, 720px);
  display: grid;
  align-items: end;
  color: #F4F1EA;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 24, 22, 0.25) 0%, rgba(12, 24, 22, 0.55) 45%, rgba(12, 24, 22, 0.88) 100%),
    radial-gradient(ellipse at 30% 20%, rgba(31, 77, 69, 0.35), transparent 55%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0 3.25rem;
  max-width: 42rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(244, 241, 234, 0.14);
  border: 1px solid rgba(244, 241, 234, 0.28);
  color: #F4F1EA;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(2rem, 5vw, 3.15rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: 0 0 1.5rem;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 1.55;
  color: rgba(244, 241, 234, 0.92);
  max-width: 36rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Sections */
.section {
  padding: 4.25rem 0;
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.section-head h2,
.what-copy h2,
.cta-copy h2,
.disclaimer-card h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section-head p,
.what-copy p,
.cta-copy p,
.disclaimer-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.roles {
  background: var(--bg);
}

.role-grid {
  display: grid;
  gap: 1rem;
}

.role-card,
.feature-card,
.disclaimer-card,
.cta-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.role-card {
  padding: 1.5rem;
}

.role-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(31, 77, 69, 0.1);
  color: var(--primary);
  margin-bottom: 1rem;
}

.role-card h3,
.feature-card h3,
.step h3 {
  margin: 0 0 0.45rem;
  color: var(--primary);
  font-size: 1.2rem;
}

.role-card p,
.feature-card p,
.step p {
  margin: 0;
  color: var(--ink);
  font-size: 1.02rem;
}

.what {
  background: linear-gradient(180deg, #EAE6DC 0%, var(--bg) 100%);
}

.what-layout {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.what-visual {
  margin: 0;
  justify-self: center;
}

.what-visual img {
  width: min(240px, 70vw);
  border-radius: 50%;
  box-shadow: var(--shadow);
}

.feature-grid {
  display: grid;
  gap: 1rem;
}

.feature-card {
  padding: 1.35rem 1.35rem 1.5rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: var(--bg);
  margin-bottom: 0.95rem;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.25rem 1.35rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.step-num {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: var(--bg);
  font-weight: 700;
}

.cta-band {
  padding-top: 2rem;
}

.cta-panel {
  display: grid;
  gap: 1.5rem;
  padding: 1.75rem;
  background:
    linear-gradient(145deg, rgba(31, 77, 69, 0.08), transparent 55%),
    var(--bg-elevated);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.todo-note,
.todo-inline {
  width: 100%;
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.todo-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #F3E2DC;
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.disclaimer {
  padding-top: 0;
}

.disclaimer-card {
  padding: 1.5rem;
}

.disclaimer-card h2 {
  color: var(--danger);
  font-size: 1.15rem;
}

.disclaimer-card > p:first-of-type {
  margin-bottom: 1rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 2rem;
  background: #EAE6DC;
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.footer-brand img {
  border-radius: 50%;
}

.footer-name {
  margin: 0 0 0.25rem;
  font-weight: 700;
}

.footer-tagline {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 28rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.15rem;
  align-items: center;
}

.footer-links a {
  text-decoration: none;
  font-weight: 600;
  color: var(--primary);
}

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

.footer-meta {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-meta p {
  margin: 0;
}

/* Reveal motion */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Breakpoints */
@media (min-width: 640px) {
  .role-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .header-actions .header-login,
  .header-actions .header-register {
    display: inline-flex;
  }
}

@media (min-width: 900px) {
  .nav-desktop {
    display: flex;
  }

  .nav-toggle,
  .nav-mobile {
    display: none !important;
  }

  .what-layout {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .step {
    grid-template-columns: 1fr;
  }

  .cta-panel {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    padding: 2.25rem;
  }

  .footer-grid {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }

  .footer-links {
    justify-content: flex-end;
  }
}

@media (max-width: 639px) {
  .hero-copy {
    padding: 3.25rem 0 2.5rem;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .brand-text {
    display: none;
  }
}

/* Auth pages */
.auth-main {
  padding: 2.5rem 0 3.5rem;
  min-height: calc(100vh - var(--header-h) - 8rem);
}

.auth-wrap {
  max-width: 480px;
}

.auth-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem 1.5rem 1.5rem;
}

.auth-title {
  margin: 0 0 1rem;
  text-align: center;
  font-size: clamp(1.6rem, 4vw, 2rem);
  color: var(--ink);
  letter-spacing: -0.02em;
}

.auth-form {
  display: grid;
  gap: 0.85rem;
}

.auth-label {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.95rem;
}

.auth-input {
  width: 100%;
  min-height: 52px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1.02rem;
}

.auth-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(31, 77, 69, 0.18);
}

.auth-input.is-locked {
  background: #EFECE4;
  color: var(--ink-soft);
}

.auth-input-bare {
  border: 0;
  box-shadow: none;
  min-height: 50px;
}

.auth-input-bare:focus {
  box-shadow: none;
}

.auth-password {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.auth-password:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 77, 69, 0.18);
}

.auth-reveal {
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0 1rem;
  min-height: 48px;
  cursor: pointer;
  white-space: nowrap;
}

.auth-code {
  text-align: center;
  letter-spacing: 0.35em;
  font-size: 1.25rem;
}

.auth-submit {
  width: 100%;
  margin-top: 0.35rem;
}

.auth-error {
  margin: 0 0 0.85rem;
  color: var(--danger);
  text-align: center;
  font-size: 0.98rem;
}

.auth-notice {
  margin: 0 0 0.85rem;
  color: var(--primary);
  text-align: center;
  font-size: 1rem;
}

.auth-hint {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  text-align: center;
  font-size: 0.98rem;
  line-height: 1.5;
}

.auth-links {
  margin: 1.1rem 0 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.auth-links a {
  font-weight: 600;
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.auth-inline-form {
  margin-top: 0.65rem;
  text-align: center;
}

.auth-text-btn {
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 0.35rem;
}

.auth-types {
  border: 0;
  margin: 0 0 0.5rem;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.auth-type {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  border: 1.5px solid var(--primary);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  cursor: pointer;
  background: transparent;
}

.auth-type input {
  margin-top: 0.2rem;
  accent-color: var(--primary);
}

.auth-type.is-selected,
.auth-type:has(input:checked) {
  background: var(--primary);
  color: var(--bg);
}

.auth-type.is-selected .auth-type-title,
.auth-type:has(input:checked) .auth-type-title,
.auth-type.is-selected .auth-type-body,
.auth-type:has(input:checked) .auth-type-body {
  color: var(--bg);
}

.auth-type-title {
  display: block;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.2rem;
}

.auth-type-body {
  display: block;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.4;
}

.auth-terms {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.auth-terms input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  accent-color: var(--primary);
}

.account-dl {
  margin: 0 0 1.25rem;
  display: grid;
  gap: 0.85rem;
}

.account-dl div {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}

.account-dl dt {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.account-dl dd {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}

.header-logout {
  display: none;
  margin: 0;
}

@media (min-width: 640px) {
  .header-logout {
    display: inline-flex;
  }
}

.auth-card .h-captcha {
  margin: 0.25rem 0;
}


/* Coming Soon toast */
.site-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(12px);
  z-index: 1000;
  max-width: min(90vw, 360px);
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.98rem;
  text-align: center;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.site-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.site-toast[hidden] {
  display: none !important;
}

.site-toast.is-visible[hidden] {
  display: block !important;
}

@media (prefers-reduced-motion: reduce) {
  .site-toast {
    transition: none;
  }
}

/* Appointments / providers / availability */
.search-bar {
  display: flex;
  gap: 0.6rem;
  margin: 0 0 1.25rem;
  flex-wrap: wrap;
}
.search-bar .auth-input {
  flex: 1 1 12rem;
  margin: 0;
}
.card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.card-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}
.card-meta {
  margin: 0.2rem 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.empty-note {
  color: var(--muted);
  margin: 0.5rem 0 1.25rem;
}
.appt-section {
  margin: 0 0 2rem;
}
.appt-section h2 {
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
}
.appt-card .inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.appt-details {
  margin-top: 0.75rem;
}
.appt-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--primary);
}
.appt-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0 0 0.35rem;
}
.appt-card-head-text {
  flex: 1;
  min-width: 0;
}
.appt-card-head .card-title {
  margin: 0 0 0.15rem;
  line-height: 1.25;
}
.appt-card-head .card-meta {
  margin: 0;
}
.appt-provider-avatar-link {
  flex: 0 0 auto;
  display: block;
  border-radius: 50%;
  line-height: 0;
}
.appt-provider-avatar-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.appt-provider-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
  text-decoration-color: color-mix(in srgb, var(--primary) 40%, transparent);
}
.appt-provider-link:hover,
.appt-provider-link:focus-visible {
  color: var(--primary);
  text-decoration-color: var(--primary);
}
@media (max-width: 560px) {
  .appt-card-head {
    gap: 0.6rem;
  }
}
.compact-form {
  margin-top: 0.6rem;
}
.status-pill {
  display: inline-block;
  margin: 0.35rem 0;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--bg);
  border: 1px solid var(--border);
}
.status-requested { color: #8a5a00; background: #fff4df; border-color: #f0d29a; }
.status-accepted { color: #1F4D45; background: #e7f4ef; border-color: #b7d9cb; }
.status-declined,
.status-cancelled { color: #7a1f1f; background: #fdeeee; border-color: #efc0c0; }

.slot-days {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 1.25rem;
}
.slot-day-label {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}
.slot-times {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.slot-time {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.slot-time.is-selected,
.slot-time:hover {
  background: var(--primary);
  color: var(--bg);
  border-color: var(--primary);
}

.pay-app-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  background: #fff8e8;
  margin: 0 0 1.25rem;
}
.pay-app-card h2 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.avail-grid {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 1.25rem;
}
.avail-day {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  background: var(--bg);
}
.avail-day-label {
  margin: 0 0 0.55rem;
  font-size: 0.98rem;
}
.avail-hours {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.avail-hour {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  font-size: 0.82rem;
  cursor: pointer;
  user-select: none;
}
.avail-hour input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.avail-hour.is-on {
  background: var(--primary);
  color: var(--bg);
  border-color: var(--primary);
  font-weight: 700;
}
.account-links {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.account-links a {
  display: block;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  background: var(--bg);
}
.account-links a:hover {
  border-color: var(--primary);
}

@media (min-width: 900px) {
  .avail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Provider photos (match app: circle 72 list / 140 profile) */
.provider-card-main {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}
.provider-card-details {
  flex: 1;
  min-width: 0;
}
.provider-avatar {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #E4DDD2;
}
.provider-avatar--lg {
  width: 140px;
  height: 140px;
}
.provider-avatar--xs {
  width: 52px;
  height: 52px;
}
.provider-avatar--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #E4DDD2;
  color: #1F4D45;
}
.provider-avatar-initials {
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1;
}
.provider-avatar--lg .provider-avatar-initials {
  font-size: 2.25rem;
}
.provider-avatar--xs .provider-avatar-initials {
  font-size: 0.95rem;
}
.provider-profile-head {
  text-align: center;
}
.provider-profile-head .provider-avatar {
  margin: 0 auto 0.85rem;
}

/* Payments */
.pay-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 1.1rem 1.15rem 1.25rem;
  margin: 0 0 1.25rem;
  box-shadow: var(--shadow);
}
.pay-amount {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0.35rem 0 0;
}
.payment-element {
  margin: 0.5rem 0 1rem;
  min-height: 4rem;
}
.mock-stripe-form .auth-input {
  margin-bottom: 0.65rem;
}
.mock-stripe-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
#pay-submit[disabled] {
  opacity: 0.65;
  cursor: wait;
}

/* Account danger zone (match app #8C3A32) */
.danger-zone {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid #efc0c0;
}
.danger-zone-title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  color: #8C3A32;
}
.danger-text {
  color: #8C3A32;
  margin: 0 0 0.85rem;
}
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #8C3A32;
  color: #fff;
  border: 1px solid #8C3A32;
  border-radius: 999px;
  padding: 0.65rem 1.15rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn-danger:hover {
  background: #732f29;
  border-color: #732f29;
  color: #fff;
}
.site-flash {
  margin: 0.75rem auto 0;
  max-width: 40rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: #e7f4ef;
  border: 1px solid #b7d9cb;
  color: #1F4D45;
  font-weight: 600;
  text-align: center;
}

/* Booking page layout (scoped — do not affect other pages) */
.book-page {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}
.book-page .book-shell {
  max-width: 900px;
  margin-inline: auto;
}
.book-page .book-provider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 1rem;
}
.book-page .book-provider .provider-avatar {
  width: 80px;
  height: 80px;
  flex: 0 0 80px;
  margin: 0;
}
.book-page .book-provider-copy {
  min-width: 0;
}
.book-page .book-provider-copy h1 {
  margin: 0 0 0.15rem;
  font-size: 1.45rem;
  line-height: 1.2;
}
.book-page .book-provider-name,
.book-page .book-provider-zone {
  margin: 0.1rem 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.book-page .book-intro {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.book-page .book-form {
  margin: 0;
}
.book-page .book-calendar {
  display: grid;
  gap: 0;
  margin: 0 0 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.book-page .book-calendar.is-js .cal-fallback {
  display: none;
}
.book-page .cal-panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0.85rem 0.9rem 0.95rem;
  max-width: none;
}
.book-page .cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}
.book-page .cal-month {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  text-align: center;
  flex: 1;
  text-transform: capitalize;
}
.book-page .cal-nav {
  appearance: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  font-weight: 700;
}
.book-page .cal-nav:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}
.book-page .cal-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.book-page .cal-weekdays,
.book-page .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.22rem;
}
.book-page .cal-weekday {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.15rem 0;
}
.book-page .cal-day {
  appearance: none;
  aspect-ratio: 1;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  min-height: 0;
  padding: 0;
}
.book-page .cal-day--pad {
  visibility: hidden;
  pointer-events: none;
}
.book-page .cal-day.has-slots {
  background: #e7f4ef;
  border-color: #b7d9cb;
  color: var(--primary);
}
.book-page .cal-day.is-today:not(.is-selected) {
  box-shadow: inset 0 0 0 2px var(--primary);
}
.book-page .cal-day.is-selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.book-page .cal-day.is-disabled,
.book-page .cal-day:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  box-shadow: none;
}
.book-page .cal-day:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.book-page .cal-slots {
  padding: 0.85rem 0.95rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.book-page .cal-slots-title {
  margin: 0 0 0.2rem;
  font-size: 0.98rem;
}
.book-page .cal-date-label {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}
.book-page .cal-slots .slot-times {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}
.book-page .cal-slots .slot-time {
  text-align: center;
  padding: 0.45rem 0.35rem;
  border-radius: 10px;
  font-size: 0.9rem;
}
.book-page .cal-slots .empty-note {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}
.book-page .book-checkout {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.95rem 1rem 1.05rem;
  display: grid;
  gap: 0.55rem;
}
.book-page .book-selected {
  margin: 0;
  min-height: 1.2em;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.92rem;
}
.book-page .book-selected:empty {
  display: none;
}
.book-page .book-fee-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}
.book-page .book-ack {
  margin: 0.15rem 0 0.2rem;
}
.book-page .book-checkout .auth-submit {
  margin: 0.25rem 0 0;
  width: 100%;
}
.book-page .auth-links {
  margin-top: 0.85rem;
  text-align: center;
}
.book-page .cal-fallback-days {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.book-page .cal-fallback-days a {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-decoration: none;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.88rem;
}
.book-page .cal-fallback-days a[aria-current="date"] {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.book-page .slot-time--radio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  cursor: pointer;
}
.book-page .slot-time--radio input {
  margin: 0;
}

@media (min-width: 760px) {
  .book-page .book-calendar.is-js {
    grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
    align-items: stretch;
  }
  .book-page .cal-panel {
    max-width: 380px;
    border-right: 1px solid var(--border);
  }
  .book-page .cal-slots {
    border-top: 0;
    justify-content: flex-start;
  }
  .book-page .cal-slots .slot-times {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 759px) {
  .book-page .book-provider {
    justify-content: flex-start;
  }
  .book-page .cal-slots .slot-times {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* Pay recovery after Stripe charge succeeded but confirm failed */
.pay-complete-form {
  margin: 0 0 1rem;
}
.pay-complete-form .card-meta {
  margin-top: 0.45rem;
}


/* Account profile edit (match app account screen fields) */
.account-page .account-shell {
  max-width: 640px;
}
.account-profile-card,
.account-links-card {
  margin-bottom: 1rem;
}
.account-profile-form {
  margin-top: 0.75rem;
}
.account-photo-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.35rem;
}
.account-photo-preview {
  flex: 0 0 auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid var(--primary);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.account-photo-preview img,
.account-photo-preview .provider-avatar {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
}
.account-photo-preview .provider-avatar--lg {
  width: 120px;
  height: 120px;
}
.account-photo-controls {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 0.35rem;
}
.account-photo-controls .auth-input {
  padding: 0.45rem 0.65rem;
  min-height: 0;
}
.account-rating {
  margin: 0.25rem 0 0;
  font-weight: 700;
  color: var(--primary);
}
.account-city-field {
  position: relative;
}
.city-suggestions {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: grid;
}
.city-suggestion {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 0.7rem 0.9rem;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
}
.city-suggestion:last-child {
  border-bottom: 0;
}
.city-suggestion:hover,
.city-suggestion:focus-visible {
  background: #f4f1ea;
  outline: none;
}
.account-bio {
  min-height: 6rem;
  resize: vertical;
  line-height: 1.4;
}
.account-visible {
  margin: 0.15rem 0;
}
.account-rate-field {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding-left: 0.85rem;
}
.account-rate-symbol {
  color: var(--primary);
  font-weight: 700;
}
.account-rate-field .auth-input {
  border: 0;
  box-shadow: none;
  min-height: 50px;
}
.account-rate-field .auth-input:focus {
  box-shadow: none;
}
.account-page .danger-zone {
  margin-top: 0.25rem;
  border-top: 0;
  padding-top: 1.1rem;
}
@media (max-width: 560px) {
  .account-photo-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .account-photo-controls {
    width: 100%;
  }
}

.provider-name-link{color:inherit;text-decoration:none}
.provider-name-link:hover,.provider-name-link:focus-visible{text-decoration:underline;text-underline-offset:3px}
