/* ==========================================================================
   Mawid Desk — mawiddesk.com
   Built on the Cal design system (designmd slug: "cal"), retinted to the
   brand's soft teal / warm white / muted charcoal direction.
   Hand-written CSS. No frameworks.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Surfaces — Cal's white-canvas / light-card ladder, warmed */
  --canvas: #fdfcf9;
  --surface-soft: #f8f5ef;
  --surface-card: #f1ede5;
  --surface-tint: #e6f0ec;
  --surface-strong: #e0dbd1;
  --surface-dark: #0f2f2c;
  --surface-dark-elevated: #17403c;

  /* Lines */
  --hairline: #e4dfd5;
  --hairline-soft: #efebe3;
  --hairline-dark: #26504b;

  /* Ink */
  --ink: #1f302d;
  --body: #4a5754;
  --muted: #64716d;
  --on-primary: #ffffff;
  --on-dark: #ffffff;
  --on-dark-soft: #a9bdb9;

  /* Action — Cal's near-black primary, shifted to a deep teal ink */
  --primary: #14514b;
  --primary-active: #0e3c37;
  --teal: #1c7a70;
  --teal-bright: #2fa095;
  --teal-soft: #bfded6;

  /* Semantic — muted, no alarm reds outside genuine alerts */
  --success: #217553;
  --success-soft: #dff0e7;
  --warning: #8a5c12;
  --warning-soft: #f7ecd9;
  --error: #a5352c;
  --error-soft: #f8e7e5;

  /* Radii — Cal's hierarchical scale */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-pill: 9999px;

  /* Spacing — 4px base */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-section: 96px;

  /* Elevation — soft and modern only */
  --shadow-1: 0 1px 2px rgba(20, 44, 41, 0.05);
  --shadow-2: 0 4px 14px rgba(20, 44, 41, 0.08);
  --shadow-3: 0 18px 44px rgba(20, 44, 41, 0.10);

  /* Motion — calm, unhurried */
  --ease: cubic-bezier(0.25, 0.6, 0.3, 1);
  --dur: 180ms;

  --display: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --text: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --arabic: "IBM Plex Sans Arabic", "Inter", sans-serif;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink);
  font-weight: 700;
  margin: 0;
}

h1 { font-size: clamp(2.15rem, 1.35rem + 3.3vw, 4rem); line-height: 1.05; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.7rem, 1.2rem + 2.1vw, 2.85rem); line-height: 1.12; letter-spacing: -0.03em; }
h3 { font-size: 1.125rem; line-height: 1.35; letter-spacing: -0.015em; font-weight: 700; }
h4 { font-size: 1rem; line-height: 1.4; letter-spacing: -0.01em; font-weight: 700; }

p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
img, svg { max-width: 100%; }

a { color: var(--primary); text-decoration-color: var(--teal-soft); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

:focus-visible {
  outline: 3px solid var(--teal-bright);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: var(--on-primary);
  padding: 12px 18px;
  border-radius: 0 0 var(--r-md) 0;
  z-index: 100;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.band { padding: var(--s-section) 0; }
.band--tight { padding: var(--s-8) 0; }
.band--soft { background: var(--surface-soft); }
.band--card { background: var(--surface-card); }
.band--tint { background: var(--surface-tint); }

/* --------------------------------------------------------------------------
   3. Type helpers
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-tint);
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 5px 14px;
  border-radius: var(--r-pill);
}
.band--card .eyebrow,
.band--soft .eyebrow,
.band--tint .eyebrow { background: #fff; }

.lede {
  font-size: 1.0625rem;
  color: var(--body);
  max-width: 58ch;
}

.section-head { max-width: 44rem; margin-bottom: var(--s-7); }
.section-head .eyebrow { margin-bottom: var(--s-4); }
.section-head h2 + .lede { margin-top: var(--s-4); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head--center .lede { margin-left: auto; margin-right: auto; }

.small { font-size: 0.875rem; }
.muted { color: var(--muted); }

/* Arabic strings */
.ar {
  font-family: var(--arabic);
  font-feature-settings: "kern";
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  min-height: 44px;
  padding: 13px 20px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn--primary {
  background: var(--primary);
  color: var(--on-primary);
}
.btn--primary:hover { background: var(--primary-active); }
.btn--primary:active { background: var(--primary-active); }
.btn--secondary {
  background: var(--canvas);
  color: var(--ink);
  border-color: var(--hairline);
  box-shadow: var(--shadow-1);
}
.btn--secondary:hover { border-color: var(--teal-soft); }
.btn--onDark {
  background: #fff;
  color: var(--primary);
}
.btn--onDark:hover { background: var(--surface-tint); }
.btn--quiet {
  background: transparent;
  color: var(--ink);
  padding-left: 12px;
  padding-right: 12px;
}
.btn--quiet:hover { background: var(--surface-card); }
.btn--lg { min-height: 50px; padding: 16px 26px; font-size: 0.9375rem; }
.btn--block { width: 100%; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-6);
}

.playmark {
  width: 18px; height: 18px;
  border-radius: var(--r-pill);
  background: var(--surface-tint);
  color: var(--primary);
  display: grid; place-items: center;
  flex: none;
}

/* Signature Cal component: pill-in-pill segmented group */
.pillgroup {
  display: inline-flex;
  gap: 2px;
  padding: 5px;
  background: var(--surface-soft);
  border-radius: var(--r-pill);
  border: 1px solid var(--hairline-soft);
}
.pillgroup .pill {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  padding: 7px 14px;
  border-radius: var(--r-pill);
  border: 0;
  background: transparent;
  font-family: var(--text);
  cursor: default;
  white-space: nowrap;
}
.pillgroup .pill.is-active {
  background: var(--canvas);
  color: var(--ink);
  box-shadow: var(--shadow-1);
}

/* --------------------------------------------------------------------------
   5. Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(253, 252, 249, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline-soft);
}
.nav {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  flex: none;
}
.brand__mark {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--primary);
  display: grid; place-items: center;
  flex: none;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin-inline-start: var(--s-4);
}
.nav__links a {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--body);
  text-decoration: none;
  padding: 9px 12px;
  border-radius: var(--r-md);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav__links a:hover { background: var(--surface-card); color: var(--ink); }
.nav__links a[aria-current="page"] { color: var(--ink); background: var(--surface-card); }
.nav__actions {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.nav__toggle {
  display: none;
  margin-inline-start: auto;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  color: var(--ink);
  cursor: pointer;
}
.nav__sheet { display: none; }

/* --------------------------------------------------------------------------
   6. Hero — Cal's 7/5 split: copy left, product mockup card right
   -------------------------------------------------------------------------- */
.hero { padding: var(--s-8) 0 var(--s-section); overflow: hidden; }
.hero__grid {
  display: grid;
  grid-template-columns: 7fr 5.6fr;
  gap: var(--s-7);
  align-items: center;
}
.hero__copy { max-width: 34rem; }
.hero__copy h1 { margin-top: var(--s-5); }
.hero__sub {
  margin-top: var(--s-5);
  font-size: 1.125rem;
  color: var(--body);
  max-width: 32rem;
}
.hero__note {
  margin-top: var(--s-5);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 0.8125rem;
  color: var(--muted);
  list-style: none;
}
.hero__note li { display: flex; align-items: center; gap: 7px; }
.hero__note li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal-bright);
  flex: none;
}
.hero__stage { position: relative; }
.hero__stage::before {
  content: "";
  position: absolute;
  inset: -6% -8% -10% -6%;
  background:
    radial-gradient(60% 60% at 70% 20%, rgba(47, 160, 149, 0.16), transparent 70%),
    radial-gradient(55% 55% at 20% 85%, rgba(241, 237, 229, 0.9), transparent 70%);
  border-radius: 40px;
  z-index: 0;
}
.hero__stage > * { position: relative; z-index: 1; }

/* --------------------------------------------------------------------------
   7. Cards
   -------------------------------------------------------------------------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-5); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-5); }

/* Cal's gray "abstract feature claim" card */
.fcard {
  background: var(--surface-card);
  border-radius: var(--r-lg);
  padding: var(--s-6);
}
.band--card .fcard, .band--soft .fcard {
  background: var(--canvas);
  border: 1px solid var(--hairline);
}
.fcard h3 { margin-bottom: 10px; }
.fcard p { font-size: 0.9375rem; }
.fcard__icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--surface-tint);
  color: var(--primary);
  display: grid; place-items: center;
  margin-bottom: var(--s-5);
}
.band--tint .fcard__icon { background: #fff; }

/* Lower-density 4-up variant */
.icard {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: var(--s-5);
}
.icard h4 { margin-bottom: 6px; }
.icard p { font-size: 0.875rem; color: var(--muted); }
.icard__icon { color: var(--teal); margin-bottom: var(--s-3); display: block; }

/* Cal's white "look at the actual product" card */
.mock {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-3);
  overflow: hidden;
}
.mock--flat { box-shadow: var(--shadow-2); }
.mock__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--hairline-soft);
  background: var(--surface-soft);
}
.mock__dots { display: flex; gap: 5px; flex: none; }
.mock__dots i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--surface-strong);
  display: block;
}
.mock__url {
  flex: 1;
  font-size: 0.6875rem;
  color: var(--muted);
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  padding: 4px 12px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mock__body { padding: var(--s-5); }
.mock__caption {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--s-3);
  font-size: 0.75rem;
  color: var(--muted);
}
.mock__caption .tagdot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal-bright); flex: none;
}

/* --------------------------------------------------------------------------
   8. Product mockups (all CSS/SVG, no images)
   -------------------------------------------------------------------------- */

/* 8a. RTL Arabic booking page */
.book { font-family: var(--arabic); }
.book__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--hairline-soft);
}
.book__avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface-tint);
  color: var(--primary);
  display: grid; place-items: center;
  font-weight: 600;
  font-size: 0.8125rem;
  flex: none;
}
.book__who { min-width: 0; }
.book__who strong { display: block; font-size: 0.9375rem; color: var(--ink); font-weight: 600; }
.book__who span { font-size: 0.75rem; color: var(--muted); }
.book__meta {
  margin-inline-start: auto;
  font-size: 0.6875rem;
  color: var(--primary);
  background: var(--surface-tint);
  border-radius: var(--r-pill);
  padding: 4px 10px;
  white-space: nowrap;
  flex: none;
}
.book__days {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: var(--s-4);
}
.day {
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 8px 4px;
  text-align: center;
  background: var(--canvas);
}
.day small { display: block; font-size: 0.625rem; color: var(--muted); }
.day b { display: block; font-size: 0.9375rem; color: var(--ink); font-weight: 600; }
.day.is-active { background: var(--primary); border-color: var(--primary); }
.day.is-active small { color: var(--teal-soft); }
.day.is-active b { color: #fff; }
.day.is-off { background: var(--surface-soft); }
.day.is-off b, .day.is-off small { color: var(--muted); }

.slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: var(--s-4);
}
.slot {
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--canvas);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 9px 4px;
  text-align: center;
}
.slot.is-taken {
  background: var(--surface-soft);
  color: var(--muted);
  border-style: dashed;
  text-decoration: line-through;
}
.slot.is-picked {
  border-color: var(--primary);
  background: var(--surface-tint);
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--primary) inset;
}
.book__confirm {
  margin-top: var(--s-4);
  background: var(--primary);
  color: #fff;
  border-radius: var(--r-md);
  padding: 12px;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
}
.book__legend {
  margin-top: 10px;
  font-size: 0.6875rem;
  color: var(--muted);
  text-align: center;
}

/* 8b. WhatsApp-style reminder thread */
.thread {
  font-family: var(--arabic);
  background: var(--surface-soft);
  border-radius: var(--r-lg);
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.thread__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--text);
}
.thread__head strong { font-size: 0.875rem; color: var(--ink); font-weight: 600; }
.thread__head .chip {
  margin-inline-start: auto;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--success);
  background: var(--success-soft);
  padding: 3px 9px;
  border-radius: var(--r-pill);
}
.bubble {
  max-width: 84%;
  border-radius: var(--r-lg);
  padding: 10px 13px;
  font-size: 0.8125rem;
  line-height: 1.65;
  position: relative;
  box-shadow: var(--shadow-1);
}
.bubble--out {
  align-self: flex-start;
  background: var(--canvas);
  color: var(--ink);
  border-start-start-radius: 4px;
}
.bubble--in {
  align-self: flex-end;
  background: var(--surface-tint);
  color: var(--ink);
  border-start-end-radius: 4px;
}
.bubble__meta {
  display: flex;
  align-items: center;
  gap: 5px;
  justify-content: flex-end;
  margin-top: 5px;
  font-family: var(--text);
  font-size: 0.625rem;
  color: var(--muted);
}
.bubble__meta .ticks { color: var(--teal-bright); }

/* 8c. RTL patient chart */
.chartui { font-family: var(--arabic); }
.chartui__top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--s-4);
}
.chartui__id {
  font-family: var(--text);
  font-size: 0.6875rem;
  color: var(--muted);
  margin-inline-start: auto;
  background: var(--surface-soft);
  border-radius: var(--r-pill);
  padding: 3px 10px;
}
.chartui__name { display: block; font-size: 1rem; font-weight: 600; color: var(--ink); }
.chartui__sub { display: block; font-size: 0.75rem; color: var(--muted); }
.vitals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  list-style: none;
}
.vital {
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 9px;
  text-align: center;
  background: var(--canvas);
}
.vital b { display: block; font-size: 0.9375rem; color: var(--ink); font-weight: 600; }
.vital span { font-size: 0.625rem; color: var(--muted); }
.vital.is-flagged { background: var(--warning-soft); border-color: #ecd8b4; }
.vital.is-flagged b { color: var(--warning); }

.visits { list-style: none; margin-top: var(--s-4); }
.visit {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--hairline-soft);
}
.visit__date {
  font-family: var(--text);
  font-size: 0.6875rem;
  color: var(--muted);
  width: 72px;
  flex: none;
  padding-top: 2px;
}
.visit__body { font-size: 0.8125rem; color: var(--body); min-width: 0; }
.visit__body b { color: var(--ink); font-weight: 600; }
.taglist { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; list-style: none; }
.taglist li {
  font-size: 0.625rem;
  background: var(--surface-tint);
  color: var(--primary);
  border-radius: var(--r-pill);
  padding: 2px 9px;
}

/* 8d. Multi-doctor day view */
.dayview { font-family: var(--arabic); }
.dayview__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--s-4);
  flex-wrap: wrap;
}
.dayview__grid {
  display: grid;
  grid-template-columns: 44px repeat(3, 1fr);
  gap: 6px;
}
.dv-rail { display: grid; gap: 6px; grid-auto-rows: 44px; padding-top: 34px; }
.dv-rail span {
  font-family: var(--text);
  font-size: 0.625rem;
  color: var(--muted);
  text-align: center;
}
.dv-col { display: grid; gap: 6px; grid-auto-rows: 44px; }
.dv-col__head {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface-soft);
  border-radius: var(--r-sm);
  padding: 0 6px;
  white-space: nowrap;
  overflow: hidden;
}
.dv-col__head i {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
}
.dv-a i { background: var(--teal-bright); }
.dv-b i { background: #7c9cc4; }
.dv-c i { background: #c39a5e; }
.dv {
  border-radius: var(--r-sm);
  padding: 6px 7px;
  font-size: 0.625rem;
  line-height: 1.35;
  color: var(--ink);
  overflow: hidden;
}
.dv b { display: block; font-weight: 600; font-size: 0.6875rem; }
.dv span { color: var(--body); font-family: var(--text); }
.dv--a { background: #e2f0ed; border: 1px solid #c6e0da; }
.dv--b { background: #e6ecf5; border: 1px solid #ccd9ea; }
.dv--c { background: #f6eee0; border: 1px solid #e9dcc2; }
.dv--free {
  background: repeating-linear-gradient(135deg, var(--surface-soft), var(--surface-soft) 6px, var(--canvas) 6px, var(--canvas) 12px);
  border: 1px dashed var(--hairline);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-family: var(--text);
}
.dv--room {
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-family: var(--text);
}

/* 8e. Offline banner detail */
.offline-note {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--warning-soft);
  border: 1px solid #ecd8b4;
  color: #7d5413;
  border-radius: var(--r-md);
  padding: 9px 13px;
  font-size: 0.75rem;
  margin-bottom: var(--s-4);
}
.offline-note svg { flex: none; color: var(--warning); }

/* --------------------------------------------------------------------------
   9. Problem band
   -------------------------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-7);
  align-items: center;
}
.split--wide { grid-template-columns: 1.05fr 1fr; }
.split--top { align-items: start; }

.problem-list { list-style: none; display: grid; gap: 2px; }
.problem-list li {
  display: flex;
  gap: var(--s-4);
  padding: var(--s-4) 0;
  border-top: 1px solid var(--hairline);
}
.problem-list li:last-child { border-bottom: 1px solid var(--hairline); }
.problem-list b { display: block; color: var(--ink); font-weight: 600; font-size: 0.9375rem; margin-bottom: 3px; }
.problem-list p { font-size: 0.9375rem; }
.problem-list .num {
  font-family: var(--display);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--surface-tint);
  border-radius: var(--r-pill);
  width: 28px; height: 28px;
  display: grid; place-items: center;
  flex: none;
}

/* --------------------------------------------------------------------------
   10. Steps
   -------------------------------------------------------------------------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-5); counter-reset: step; }
.steps li {
  padding-top: var(--s-5);
  border-top: 2px solid var(--surface-strong);
  position: relative;
}
.steps li:first-child { border-top-color: var(--primary); }
.steps .step__k {
  font-family: var(--text);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 10px;
}
.steps h3 { margin-bottom: 8px; }
.steps p { font-size: 0.9375rem; }

/* --------------------------------------------------------------------------
   11. Pricing
   -------------------------------------------------------------------------- */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); align-items: stretch; }
.tier {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-1);
}
.tier__name { font-family: var(--text); font-size: 1.25rem; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.tier__for { font-size: 0.8125rem; color: var(--muted); margin-top: 4px; }
.tier__price {
  font-family: var(--display);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-top: var(--s-5);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.tier__price span { font-family: var(--text); font-size: 0.875rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.tier__list { list-style: none; margin: var(--s-5) 0 var(--s-6); display: grid; gap: 11px; font-size: 0.9375rem; }
.tier__list li { display: flex; gap: 10px; align-items: flex-start; }
.tier__list svg { flex: none; margin-top: 3px; color: var(--teal); }
.tier .btn { margin-top: auto; }
.tier__note { margin-top: 12px; font-size: 0.75rem; color: var(--muted); text-align: center; }

/* Featured tier inverts to the dark surface — Cal's only non-footer dark card */
.tier--featured {
  background: var(--surface-dark);
  border-color: var(--surface-dark);
  color: var(--on-dark-soft);
  box-shadow: var(--shadow-2);
}
.tier--featured .tier__name,
.tier--featured .tier__price { color: #fff; }
.tier--featured .tier__for,
.tier--featured .tier__note { color: var(--on-dark-soft); }
.tier--featured .tier__list { color: #e8f0ee; }
.tier--featured .tier__list svg { color: var(--teal-bright); }
.tier--featured .tier__badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--surface-dark);
  background: var(--teal-bright);
  border-radius: var(--r-pill);
  padding: 3px 10px;
  margin-bottom: var(--s-4);
}

.price-foot {
  margin-top: var(--s-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-6);
  font-size: 0.875rem;
  color: var(--muted);
  list-style: none;
}
.price-foot li { display: flex; gap: 8px; align-items: center; }
.price-foot svg { color: var(--teal); flex: none; }

/* --------------------------------------------------------------------------
   12. Credibility
   -------------------------------------------------------------------------- */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.stat {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: var(--s-5) var(--s-6);
}
.stat__num {
  font-family: var(--display);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
  display: block;
}
.stat__label { font-size: 0.9375rem; color: var(--ink); font-weight: 600; margin-top: 6px; }
.stat__meta { font-size: 0.8125rem; color: var(--muted); margin-top: 4px; }
.pending {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--text);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  padding: 3px 10px;
  margin-bottom: var(--s-4);
}

.quote-card {
  background: var(--surface-card);
  border-radius: var(--r-lg);
  padding: var(--s-6);
}
.band--card .quote-card,
.band--soft .quote-card {
  background: var(--canvas);
  border: 1px dashed var(--surface-strong);
}
.quote-card blockquote { margin: 0; font-size: 1.0625rem; color: var(--ink); line-height: 1.6; }
.quote-card figcaption { margin-top: var(--s-4); display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--primary);
  display: grid; place-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  flex: none;
}
.quote-card figcaption span { font-size: 0.8125rem; color: var(--muted); }
.quote-card figcaption b { display: block; color: var(--ink); font-size: 0.875rem; }

/* FAQ (native details, no JS) */
.faq { border-top: 1px solid var(--hairline); }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: var(--s-5) 44px var(--s-5) 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.015em;
  color: var(--ink);
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  inset-inline-end: 8px;
  top: 50%;
  width: 11px; height: 11px;
  margin-top: -8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform var(--dur) var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq p { padding: 0 44px var(--s-5) 0; font-size: 0.9375rem; max-width: 62ch; }

/* --------------------------------------------------------------------------
   13. CTA band + footer
   -------------------------------------------------------------------------- */
.ctaband {
  background: var(--surface-card);
  border-radius: var(--r-xl);
  padding: var(--s-7);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ctaband::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 120% at 50% 0%, rgba(47, 160, 149, 0.14), transparent 65%);
  pointer-events: none;
}
.ctaband > * { position: relative; z-index: 1; }
.ctaband .lede { margin: var(--s-4) auto 0; }
.ctaband [dir="rtl"] { text-align: center; }
.ctaband .cta-row { justify-content: center; }

.site-footer {
  background: var(--surface-dark);
  color: var(--on-dark-soft);
  padding: var(--s-8) 0 var(--s-6);
  margin-top: var(--s-section);
}
.site-footer .brand { color: #fff; }
.site-footer .brand__mark { background: var(--surface-dark-elevated); }
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--s-6) var(--s-5);
}
.foot-blurb { font-size: 0.875rem; color: var(--on-dark-soft); margin-top: var(--s-4); max-width: 30ch; }
.foot-ar {
  font-family: var(--arabic);
  font-size: 0.8125rem;
  color: var(--teal-soft);
  margin-top: var(--s-3);
}
.foot-col h4 { color: #fff; font-family: var(--text); font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; margin-bottom: var(--s-4); }
.foot-col ul { list-style: none; display: grid; gap: 10px; }
.foot-col a, .foot-col span { font-size: 0.875rem; color: var(--on-dark-soft); text-decoration: none; }
.foot-col a:hover { color: #fff; text-decoration: underline; }
.foot-bottom {
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid var(--hairline-dark);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-5);
  align-items: center;
  font-size: 0.8125rem;
}
.foot-bottom .dot { color: #3d6a65; }

/* --------------------------------------------------------------------------
   14. Contact page
   -------------------------------------------------------------------------- */
.page-head { padding: var(--s-8) 0 var(--s-6); }
.contact-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--s-7);
  align-items: start;
}
.form-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: var(--s-6);
  box-shadow: var(--shadow-2);
}
.field { margin-bottom: var(--s-5); }
.field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
}
.field .hint { font-weight: 400; color: var(--muted); }
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--text);
  font-size: 1rem;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 12px 14px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 160, 149, 0.25);
}
.field textarea { min-height: 132px; resize: vertical; }
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-inline-end: 40px;
}
.field .err {
  display: none;
  margin-top: 7px;
  font-size: 0.8125rem;
  color: var(--error);
  font-weight: 500;
}
.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea { border-color: var(--error); background: var(--error-soft); }
.field.is-invalid .err { display: block; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); }
.form-foot p { font-size: 0.8125rem; color: var(--muted); max-width: 34ch; }

.form-success {
  display: none;
  border: 1px solid var(--teal-soft);
  background: var(--surface-tint);
  border-radius: var(--r-lg);
  padding: var(--s-6);
}
.form-success h3 { margin-bottom: 8px; }
.form-success p { font-size: 0.9375rem; }
.form-card.is-sent .form-success { display: block; }
.form-card.is-sent form { display: none; }

.aside-card {
  background: var(--surface-card);
  border-radius: var(--r-lg);
  padding: var(--s-6);
}
.aside-card + .aside-card { margin-top: var(--s-5); }
.aside-card h3 { margin-bottom: var(--s-4); }
.info-list { list-style: none; display: grid; gap: var(--s-4); }
.info-list li { display: flex; gap: 12px; align-items: flex-start; }
.info-list svg { color: var(--teal); flex: none; margin-top: 3px; }
.info-list b { display: block; color: var(--ink); font-size: 0.875rem; }
.info-list span, .info-list a { font-size: 0.9375rem; }
.next-list { list-style: none; display: grid; gap: var(--s-4); counter-reset: n; }
.next-list li { display: flex; gap: 12px; font-size: 0.9375rem; }
.next-list li::before {
  counter-increment: n;
  content: counter(n);
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--primary);
  background: #fff;
  border-radius: 50%;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  flex: none;
}

/* --------------------------------------------------------------------------
   15. RTL awareness
   -------------------------------------------------------------------------- */
[dir="rtl"] { text-align: right; }
[dir="rtl"] .visit__date { text-align: left; }
[dir="rtl"] .bubble--out { align-self: flex-end; }
[dir="rtl"] .bubble--in { align-self: flex-start; }
[dir="rtl"] .bubble__meta { justify-content: flex-start; }
[dir="rtl"] .dayview__grid { direction: rtl; }

/* --------------------------------------------------------------------------
   16. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root { --s-section: 72px; }
  .hero__grid { grid-template-columns: 1fr; gap: var(--s-7); }
  .hero__copy { max-width: 42rem; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .pricing { grid-template-columns: 1fr; max-width: 30rem; }
  .stat-grid { grid-template-columns: 1fr; }
  .split, .split--wide { grid-template-columns: 1fr; gap: var(--s-6); }
  .contact-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav__links, .nav__actions { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav__sheet {
    display: none;
    padding: var(--s-4) 0 var(--s-6);
    border-top: 1px solid var(--hairline-soft);
  }
  .nav__sheet.is-open { display: block; }
  .nav__sheet ul { list-style: none; display: grid; gap: 2px; margin-bottom: var(--s-4); }
  .nav__sheet a {
    display: block;
    padding: 13px 12px;
    border-radius: var(--r-md);
    font-size: 1rem;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
  }
  .nav__sheet a:hover { background: var(--surface-card); }
  .nav__sheet .btn { width: 100%; }
  .nav__sheet .sheet-actions { display: grid; gap: 10px; }
}

@media (max-width: 720px) {
  :root { --s-section: 60px; }
  .wrap { padding: 0 18px; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps li { padding-top: var(--s-4); }
  .vitals { grid-template-columns: repeat(2, 1fr); }
  .dayview__grid { grid-template-columns: 34px repeat(3, 1fr); }
  .dv { font-size: 0.5625rem; padding: 5px; }
  .dv b { font-size: 0.625rem; }
  .ctaband { padding: var(--s-6) var(--s-5); }
  .foot-grid { grid-template-columns: 1fr; gap: var(--s-6); }
  .fcard { padding: var(--s-5); }
  .form-card, .aside-card { padding: var(--s-5); }
  .mock__body { padding: var(--s-4); }
  .cta-row .btn { width: 100%; }
  .hero__stage::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
