/*
 * Design language matches mawaddah.ru (src/styles/global.css there): Manrope
 * for display/headings, Inter for body/UI text, a blue-on-white palette, and
 * the same shadow/radius/pill scale. Visitors only ever reach this app
 * already deep-linked from a specific mediator's mawaddah.ru profile, so it
 * needs to read as the same site, not a separate brand.
 */

:root {
  --font-display: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --color-bg: #f7f8fb;
  --color-bg-2: #eef1f7;
  --color-surface-1: #ffffff;
  --color-surface-2: rgba(10, 15, 26, 0.04);
  --color-surface-3: rgba(10, 15, 26, 0.07);
  --color-border: #e6e9f0;
  --color-border-strong: rgba(10, 15, 26, 0.16);
  --color-ink: #0a0f1a;
  --color-ink-muted: #6b7688;
  --color-ink-soft: rgba(10, 15, 26, 0.46);

  --color-primary: #2f6bf5;
  --color-primary-dark: #1a4bc4;
  --color-primary-tint: #e8effe;

  --color-danger: #b3261e;
  --color-danger-bg: #fdecea;
  --color-warning: #8a5a00;
  --color-warning-bg: #fff4e5;

  --shadow-card: 0 1px 2px rgba(13, 27, 42, 0.04), 0 16px 40px -20px rgba(15, 47, 107, 0.22);
  --shadow-card-hover: 0 1px 2px rgba(13, 27, 42, 0.06), 0 28px 56px -24px rgba(15, 47, 107, 0.32);
  --radius-sm: 12px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-2xl: 40px;
  --radius-pill: 999px;

  --hero-bg: radial-gradient(80% 60% at 50% 0%, #e8effe 0%, #f7f8fb 62%);
  --band-bg: linear-gradient(to bottom, #e8effe, #f7f8fb, #e8effe);

  --container-max: 1180px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font: 16px/1.6 var(--font-body);
  color: var(--color-ink);
  background-color: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Grows to fill leftover height so a short page still pins the footer to
   the viewport bottom instead of leaving it floating under sparse content. */
#content {
  flex: 1 0 auto;
}

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

a {
  color: inherit;
}

ul,
ol {
  padding-left: 1.25em;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--color-primary);
  color: #fff;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  z-index: 200;
}

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

/* -- typography ------------------------------------------------------- */

h1,
h2,
h3,
.font-display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0 0 0.5em;
}

h1 {
  font-size: 2.1rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1em;
}

.lede {
  color: var(--color-ink-muted);
  font-size: 17px;
  max-width: 38rem;
}

.muted {
  color: var(--color-ink-soft);
  font-size: 13px;
}

/* -- layout ------------------------------------------------------------ */

main,
.site-header__inner,
.site-footer__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

main {
  padding-block: 2.5rem 4rem;
}

/* -- site header --------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-block: 14px;
  background: rgba(247, 248, 251, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.brand__logo {
  height: 22px;
  width: auto;
}

.site-nav {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-ink-muted);
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}

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

.site-header__cta {
  font-size: 13px;
  padding: 0.6rem 1.25rem;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .site-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 1.25rem;
  }
}

/* -- buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  color: #fff;
  font: 600 15px/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
}

.btn:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn--ghost {
  background: transparent;
  color: var(--color-ink);
  border: 1px solid var(--color-border);
  box-shadow: none;
}

.btn--ghost:hover {
  background: var(--color-primary-tint);
  border-color: var(--color-primary);
  box-shadow: none;
  transform: none;
}

.btn--tiny {
  padding: 0.3rem 0.65rem;
  font-size: 12px;
}

.btn--disabled,
.btn:disabled {
  opacity: 0.45;
  cursor: default;
  box-shadow: none;
  transform: none;
  pointer-events: none;
}

/* -- form controls ---------------------------------------------------- */

input[type="text"],
input[type="date"],
input[type="time"],
input:not([type]),
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--color-border-strong);
  border-radius: 14px;
  background: var(--color-surface-1);
  font: 15px/1.4 var(--font-body);
  color: var(--color-ink);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-ink-muted);
  margin: 1rem 0 0.4rem;
}

.error {
  color: var(--color-danger);
  background: var(--color-danger-bg);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 14px;
}

.notice {
  background: rgba(47, 107, 245, 0.1);
  color: var(--color-primary);
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 14px;
}

.hidden {
  display: none;
}

/* -- hero (landing) ----------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 4rem 1.5rem;
  margin: 0 0 3rem;
  border-radius: var(--radius-2xl);
  background: var(--hero-bg);
}

.hero__inner {
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.3rem, 6vw, 3.75rem);
}

.hero h1 em {
  font-style: italic;
  color: var(--color-primary);
  text-shadow: 0 0 40px rgba(47, 107, 245, 0.25);
}

.hero .lede {
  margin: 1.25rem auto 0;
}

.hero__actions {
  margin-top: 1.75rem;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__trust {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--color-ink-soft);
}

/* -- login modal (ZawajyFamily.Web.LoginModal) ----------------------------- */

.text-link {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

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

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal.hidden {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 26, 0.55);
  backdrop-filter: blur(2px);
}

.modal__panel {
  position: relative;
  width: 100%;
  max-width: 22rem;
  background: var(--color-surface-1);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 2rem 1.75rem;
  text-align: center;
}

.modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--color-ink-soft);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.modal__close:hover {
  background: var(--color-surface-2);
  color: var(--color-ink);
}

.modal__title {
  margin: 0 0 1.5rem;
}

.modal__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* .modal__actions comes after the generic .hidden in source order, so at
   equal specificity it would otherwise win and the RU-hidden Google/Apple
   group would render open -- same fix as .modal.hidden above. */
.modal__actions.hidden {
  display: none;
}

.btn--social {
  width: 100%;
  box-shadow: none;
}

.btn--google {
  background: var(--color-surface-1);
  color: var(--color-ink);
  border: 1px solid var(--color-border-strong);
}

.btn--google:hover {
  background: var(--color-surface-2);
  transform: none;
}

.btn--apple {
  background: var(--color-ink);
  color: #fff;
}

.btn--apple:hover {
  background: #000;
  transform: none;
}

.btn--vk {
  background: #0077ff;
  color: #fff;
}

.btn--vk:hover {
  background: #0066dd;
  transform: none;
}

.btn--yandex {
  background: #fc3f1d;
  color: #fff;
}

.btn--yandex:hover {
  background: #e0350f;
  transform: none;
}

.modal__hint {
  margin: 1rem 0 0;
  font-size: 14px;
}

.modal__error {
  margin: 1rem 0 0;
  color: var(--color-danger);
  font-size: 14px;
}

/* -- steps / features (landing) ------------------------------------------ */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.step {
  background: var(--color-surface-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
}

.step__num {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--color-primary);
  font-weight: 600;
}

.step h3 {
  margin: 0.4rem 0 0.5rem;
}

.step p {
  margin: 0;
  color: var(--color-ink-muted);
  font-size: 14px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 2.5rem 0;
}

.feature {
  background: var(--color-bg-2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.feature h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.feature p {
  margin: 0;
  font-size: 13.5px;
  color: var(--color-ink-muted);
}

/* The one .feature that is also a link (into /cases) -- same card, plus a
   hover lift and an icon badge so it visually reads as clickable next to the
   plain informational ones around it. */
.feature--link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}

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

.feature__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 0.6rem;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
}

/* Radio-driven tabs, no JS: inputs are visually hidden but stay focusable,
   and `~` sibling selectors show the matching panel/highlight the matching
   tab. Keeps the hero segment switcher working with JavaScript off, same as
   every other link on this SSR page. */
.segments {
  max-width: 30rem;
  margin: 1.75rem auto 0;
}

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

.segments__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.segments__tab {
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface-1);
  color: var(--color-ink-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.segments__panel {
  display: none;
  margin-top: 1.1rem;
  text-align: center;
}

.segments__panel p {
  margin: 0.35rem 0 0;
}

#segment-pair:checked ~ .segments__tabs label[for="segment-pair"],
#segment-parent:checked ~ .segments__tabs label[for="segment-parent"],
#segment-solo:checked ~ .segments__tabs label[for="segment-solo"] {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

#segment-pair:checked ~ .segments__panel[data-for="pair"],
#segment-parent:checked ~ .segments__panel[data-for="parent"],
#segment-solo:checked ~ .segments__panel[data-for="solo"] {
  display: block;
}

/* Marks content the product team still needs to fill in with real facts --
   deliberately conspicuous so a placeholder can never read as a real claim. */
.todo {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-pill);
  border: 1px dashed var(--color-border-strong);
  color: var(--color-ink-soft);
  font-size: 11.5px;
}

.value--todo {
  border-style: dashed;
}

.leader {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  max-width: 42rem;
  margin: 2.5rem auto;
  background: var(--color-surface-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.leader__quote {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 0.75rem;
}

.leader__name {
  margin: 0;
  font-weight: 700;
}

.leader__title {
  margin: 0;
  color: var(--color-ink-soft);
  font-size: 13px;
}

@media (max-width: 560px) {
  .leader {
    flex-direction: column;
    text-align: center;
  }
}

.values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 2.5rem 0;
}

.value {
  background: var(--color-surface-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.value h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.value p {
  margin: 0;
  font-size: 13.5px;
  color: var(--color-ink-muted);
}

.mission {
  max-width: 42rem;
  margin: 3rem auto;
  padding-inline: 1rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-ink);
}

.faq {
  max-width: 42rem;
  margin: 2rem auto 0;
}

.faq__item {
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}

.faq__item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 600;
  color: var(--color-ink);
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary::after {
  content: "+";
  flex: none;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--color-primary);
}

.faq__item[open] summary::after {
  content: "\2212";
}

.faq__item p {
  margin: 0.75rem 0 0;
  color: var(--color-ink-muted);
  font-size: 14.5px;
}

.cta-band {
  text-align: center;
  background: var(--band-bg);
  border-radius: var(--radius-2xl);
  padding: 3rem 1.5rem;
  margin-top: 3rem;
}

.cta-band .lede {
  margin-inline: auto;
}

/* -- catalog -------------------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.75rem 0 2rem;
}

.chip {
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-strong);
  color: var(--color-ink-muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  background: var(--color-surface-1);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.chip:hover {
  border-color: var(--color-primary);
  color: var(--color-ink);
}

.chip--on {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--color-surface-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}

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

.card__link {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  align-items: flex-start;
}

.card__body {
  flex: 1;
  min-width: 0;
}

.card__name {
  margin: 0 0 0.15rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
}

.card__title {
  margin: 0 0 0.4rem;
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 600;
}

.card__meta {
  margin: 0 0 0.3rem;
  color: var(--color-ink-soft);
  font-size: 13px;
}

.card__tags {
  margin: 0;
  color: var(--color-ink-muted);
  font-size: 13px;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.avatar--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-2);
  color: var(--color-primary);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
}

.avatar--lg {
  width: 120px;
  height: 120px;
}

.avatar--lg.avatar--empty {
  font-size: 2.5rem;
}

.empty {
  color: var(--color-ink-soft);
  padding: 2rem 0;
}

/* Offline events: a handful of richer, larger cards rather than the dense
   .card/.cards grid built for many small doctor listings -- own classes so
   tuning this layout can never affect the doctor catalogue. */
.event-cards {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.event-card {
  display: flex;
  background: var(--color-surface-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}

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

.event-card__cover {
  width: 320px;
  flex-shrink: 0;
  object-fit: cover;
}

.event-card__body {
  padding: 2rem;
  flex: 1;
  min-width: 0;
}

/* A cover-less card has no flex sibling to size against, so .event-card__body
   would otherwise stay full width -- harmless, just noted so nobody "fixes"
   the missing width rule here. */
@media (max-width: 640px) {
  .event-card {
    flex-direction: column;
  }

  .event-card__cover {
    width: 100%;
    height: 200px;
  }
}

.event-card__name {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
}

.event-card__meta {
  margin: 0 0 1rem;
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 600;
}

.event-card__desc {
  margin: 0 0 1rem;
  color: var(--color-ink-soft);
  line-height: 1.6;
}

.event-card__speakers {
  margin: 0;
  color: var(--color-ink-muted);
  font-size: 13px;
}

/* "Разбор ситуаций" articles: a plain list (title + date), and a narrower
   reading column on the article page itself -- unlike the cards above, there
   is no image or facts grid here, just text, so a card treatment would only
   add empty chrome. */
.case-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.case-item__link {
  display: block;
  padding: 1.5rem 0;
  border-top: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
}

.case-item__title {
  margin: 0 0 0.4rem;
}

.case-item__meta {
  margin: 0;
  color: var(--color-ink-soft);
  font-size: 14px;
}

.case {
  max-width: 42rem;
}

.case__meta {
  margin: 0.35rem 0 2rem;
  color: var(--color-ink-soft);
  font-size: 14px;
}

.case__body {
  line-height: 1.7;
}

.case__body :is(h2, h3) {
  margin-top: 1.75rem;
}

.case__body p {
  margin: 0 0 1.1em;
}

/* /aya: curated ayah/hadith excerpts, grouped into one .aya-topic section
   per topic. Each excerpt is its own .scripture block -- reference line,
   then the Arabic (right-to-left) and its Russian rendering. */
.aya-topic {
  margin: 2.5rem 0 0;
}

.aya-topic + .aya-topic {
  margin-top: 3rem;
}

.scripture {
  background: var(--color-bg-2);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin: 1.25rem 0 0;
}

.scripture__ref {
  margin: 0 0 0.6rem;
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 600;
}

.scripture__ar {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 2;
}

.scripture__ru {
  margin: 0;
  color: var(--color-ink-soft);
}

/* /tests: each test links out to mawaddah.ru, so the whole row is the link
   (unlike .case-item, where only the title text is) -- own classes rather
   than reusing .case-item, since the click target differs. */
.test-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.test-item {
  display: block;
  padding: 1.5rem 0;
  border-top: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
}

.test-item__title {
  margin: 0 0 0.4rem;
}

.test-item__desc {
  margin: 0;
  color: var(--color-ink-soft);
  font-size: 14px;
}

.quiz-page {
  max-width: 42rem;
}

/* The live island mounts here -- same "loading" treatment as
   .calendar-mount/.mount in Layout, until Live.TestLive replaces it. */
.quiz-mount {
  color: var(--color-ink-soft);
  padding: 2rem 0;
}

.quiz {
  max-width: 32rem;
  background: var(--color-surface-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.quiz__error {
  color: var(--color-danger);
  background: var(--color-danger-bg);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  margin: 0 0 1rem;
  font-size: 14px;
}

.quiz__question + .quiz__question {
  margin-top: 1.5rem;
}

.quiz__question-text {
  display: block;
  margin: 0 0 0.6rem;
  font-weight: 600;
}

.quiz__options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quiz__option {
  text-align: left;
  padding: 0.65rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-1);
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.quiz__option:hover {
  border-color: var(--color-primary);
}

.quiz__option--on {
  border-color: var(--color-primary);
  background: var(--color-bg-2);
  font-weight: 600;
}

.quiz__actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.quiz__result-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.quiz__result-text {
  color: var(--color-ink-muted);
  line-height: 1.6;
}

/* Landing-page doctor carousel: same .card/.avatar visuals as the
   catalogue, just laid out as a horizontally scroll-snapping rail instead
   of a grid, since the landing page has no room for a full multi-row
   catalogue. Plain CSS scroll-snap -- no JS carousel library, same "works
   with JavaScript off" reasoning as the rest of this page. */
.doctor-carousel {
  margin: 2.5rem 0;
}

.carousel {
  margin: 1.5rem -1rem 0;
}

.carousel__track {
  list-style: none;
  margin: 0;
  /* overflow-x: auto below forces overflow-y to auto too (the CSS overflow
     spec does not allow x:auto/y:visible), so a hovered .card's shadow --
     and its translateY(-3px) lift -- gets clipped at the track's padding
     edge unless there is enough padding to contain their full reach. */
  padding: 1rem 1rem 3rem;
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.carousel__item {
  flex: 0 0 260px;
  scroll-snap-align: start;
}

@media (max-width: 560px) {
  .carousel__item {
    flex: 0 0 220px;
  }
}

.pagination {
  display: flex;
  gap: 0.4rem;
  margin-top: 2rem;
}

.page {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  text-decoration: none;
  color: var(--color-ink-muted);
  font-size: 14px;
}

.page--on {
  background: var(--color-primary);
  color: #fff;
}

.page:not(.page--on):hover {
  background: var(--color-surface-2);
}

/* -- doctor profile --------------------------------------------------- */

.doctor__head {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
}

.doctor__head h1 {
  margin: 0;
}

.doctor__title {
  margin: 0.25rem 0 0;
  color: var(--color-primary);
  font-weight: 600;
}

.doctor__meta {
  margin: 0.35rem 0 0;
  color: var(--color-ink-soft);
  font-size: 14px;
}

.doctor section {
  margin: 1.75rem 0;
}

.tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tags li {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  background: var(--color-bg-2);
  font-size: 13px;
  color: var(--color-ink-muted);
}

.booking {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.calendar-mount,
.mount {
  color: var(--color-ink-soft);
  padding: 2rem 0;
}

@media (max-width: 560px) {
  .doctor__head {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
}

/* -- calendar ------------------------------------------------------------- */

.calendar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.calendar--empty {
  color: var(--color-ink-soft);
  padding: 1.5rem 0;
}

.calendar__tz {
  font-size: 13px;
  color: var(--color-ink-soft);
}

.calendar__days {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.day {
  background: var(--color-surface-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
}

.day__label {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 0.6rem;
  color: var(--color-ink);
}

.day__slots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.slot {
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface-1);
  font: 13px/1 var(--font-body);
  cursor: pointer;
  color: var(--color-ink);
}

.slot:hover {
  border-color: var(--color-primary);
  background: rgba(47, 107, 245, 0.08);
  color: var(--color-primary);
}

.calendar__nav {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

/* -- booking confirm ---------------------------------------------------- */

.confirm {
  max-width: 32rem;
  background: var(--color-surface-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.confirm__title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.confirm__line {
  margin: 0.3rem 0;
  color: var(--color-ink-muted);
}

.confirm__error {
  color: var(--color-danger);
  background: var(--color-danger-bg);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  margin: 0.6rem 0;
  font-size: 14px;
}

.card-form {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-2);
}

.card-form__row {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.card-form__row input {
  width: auto;
  min-width: 0;
  flex: 1;
}

.confirm__actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

/* -- bookings lists (client + cabinet) ----------------------------------- */

.bookings,
.cabinet__list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.bookings--empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-ink-soft);
}

.bookings--empty .btn {
  margin-top: 1rem;
}

.booking {
  background: var(--color-surface-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.3rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1rem;
}

.booking__when {
  font-weight: 600;
}

.booking__who {
  color: var(--color-ink-muted);
}

.booking__note {
  flex-basis: 100%;
  font-size: 13px;
  color: var(--color-ink-soft);
  font-style: italic;
}

.booking__actions {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
}

.cabinet__status {
  color: var(--color-ink-muted);
  margin-bottom: 1rem;
}

.cabinet__warning {
  background: var(--color-warning-bg);
  color: var(--color-warning);
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 14px;
}

.cabinet__empty {
  color: var(--color-ink-soft);
  padding: 2rem 0;
}

/* -- cabinet tabs --------------------------------------------------------- */

.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--color-border);
}

.tab {
  padding: 0.7rem 0;
  margin-right: 1.5rem;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-ink-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.tab:hover {
  color: var(--color-ink);
}

.tab--on {
  color: var(--color-ink);
  border-bottom-color: var(--color-primary);
}

.gate {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--color-ink-muted);
}

/* -- doctor application (cabinet) ------------------------------------------ */

.doctor-apply-intro {
  max-width: 28rem;
  margin: 2rem auto;
  text-align: center;
}

.doctor-apply-intro .label {
  margin: 0 0 1.25rem;
  font: 15px/1.5 var(--font-body);
  font-weight: 400;
  color: var(--color-ink);
}

.doctor-apply {
  max-width: 28rem;
  margin: 0 auto;
}

.doctor-apply .btn {
  margin-top: 1.5rem;
}

/* -- schedule editor ------------------------------------------------------ */

.settings {
  display: grid;
  gap: 0.25rem;
  max-width: 28rem;
  margin-bottom: 2rem;
}

.field {
  display: flex;
  flex-direction: column;
}

.week {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.week__day {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.week__name {
  width: 9rem;
  flex-shrink: 0;
  font-weight: 600;
  font-size: 14px;
}

.week__shifts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 1;
}

.shift {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--color-bg-2);
  font-size: 13px;
}

.add-shift,
.timeoff__add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: flex-end;
  background: var(--color-surface-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  margin-bottom: 1.5rem;
}

.add-shift .label,
.timeoff__add .label {
  width: 100%;
  margin: 0 0 0.2rem;
}

.add-shift select,
.add-shift input,
.timeoff__add select,
.timeoff__add input {
  width: auto;
  min-width: 8rem;
  flex: 1 1 8rem;
}

.tz-display {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-bg-2);
  font-size: 15px;
}

.muted-link {
  font-size: 13px;
  color: var(--color-primary);
  text-decoration: none;
}

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

/* -- city picker (doctor onboarding) --------------------------------------- */

.city-picker {
  max-width: 28rem;
}

.city-picker__results {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 1rem;
}

.city-picker__row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.7rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-1);
  color: var(--color-ink);
  font: 15px/1.4 var(--font-body);
  cursor: pointer;
}

.city-picker__row:hover {
  border-color: var(--color-primary);
  background: rgba(47, 107, 245, 0.08);
}

.city-picker__empty {
  color: var(--color-ink-soft);
  padding: 1rem 0;
  font-size: 14px;
}

/* -- time off ------------------------------------------------------------- */

.timeoff__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.timeoff__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1rem;
  background: var(--color-surface-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.timeoff__empty {
  color: var(--color-ink-soft);
  padding: 1.5rem 0;
}

.conflicts {
  background: var(--color-warning-bg);
  border-radius: var(--radius-lg);
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
}

.conflict {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.4rem 0;
  font-size: 14px;
}

/* -- consultation room ---------------------------------------------------- */

.room {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 60rem;
  margin-inline: auto;
}

.room--blocked {
  text-align: center;
  padding: 4rem 1rem;
  gap: 1.5rem;
  align-items: center;
}

.room__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.room__status {
  font-size: 13px;
  color: var(--color-ink-soft);
}

.room__video {
  position: relative;
  background: #0a0612;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.video--remote {
  width: 100%;
  height: 100%;
}

.video--remote video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video--local {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  width: 22%;
  min-width: 110px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.video--local video {
  width: 100%;
  display: block;
}

.room__controls {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* -- site footer ---------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--color-border);
  margin-top: 4rem;
  padding-block: 2rem;
  color: var(--color-ink-soft);
  font-size: 13px;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: center;
}

.site-footer a {
  color: var(--color-ink-muted);
  text-decoration: none;
}

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

/* -- diagnostic spike page (never routed in production) ------------------- */

.spike > div {
  padding: 0.15rem 0;
  color: var(--color-ink-muted);
}
