/* Keep Menu on the left and the home link on the right on public pages. */
.site-header-tools { display: flex; align-items: center; justify-self: start; }
.top > .brand { grid-column: 2; justify-self: center; }
.top:has(.site-header-tools > .menu) { grid-template-columns: minmax(0, 1fr) auto auto; }
.top:has(.site-header-tools > .menu) > .brand { grid-column: 3; justify-self: end; }
.top:has(.site-header-tools > .menu) > .header-actions { grid-column: 2; }
.top:has(.site-header-tools > .menu) > .header-actions:not(:empty) { margin-inline-end: 8px; }
.theme-toggle {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.theme-toggle svg { width: 30px; height: 30px; }
.theme-toggle[aria-pressed="true"] svg { transform: rotate(180deg); }
.theme-toggle:is(:hover, :focus-visible) { background: var(--sagewash); }
.theme-toggle:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }

@media (max-width: 760px) {
  .top:has(.site-header-tools) {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    padding-inline: 8px;
    gap: 3px;
  }
}
@media (max-width: 370px) {
  .top:has(.site-header-tools) .brand { font-size: .8rem; letter-spacing: .12em; }
}

.home-page .top:has(.site-header-tools > .menu) {
  grid-template-columns: minmax(0, 1fr) auto var(--home-portrait-width);
  padding-inline: max(var(--home-side-padding), (100% - var(--home-content-width)) / 2);
}
.home-page .top:has(.site-header-tools > .menu) > .brand { justify-self: center; }

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #17211d;
  --ink: #f2ede2;
  --muted: #c1cbbd;
  --sage: #aebfa4;
  --sagewash: #2b3b32;
  --clay: #e4ac91;
  --blush: #443330;
  --sand: #37352e;
  --line: #59665b;
  --raised: #26312b;
  --lilac: #3b3548;
  --honey: #493c2a;
  --blue: #2c3b47;
  --teal: #29433f;
}

/* Surfaces for reading and controls. Images and illustrated practice stages keep their own palettes. */
[data-theme="dark"] {
  p, .lesson ol, .drawer-description, .class-day-dates, .moon-legend, .moon-weekdays span,
  .chakra-colour-label small, .chakra-pose-centre span, .chakra-pose-sanskrit, .chakra-pose-food b,
  .surya-poster figcaption, .enquiry-panel .optional { color: var(--muted); }
  .drawer, .flower-widget, .lesson, .offering, .library-details, .library-explainer > div,
  .chakra-pose-card, .year-month, .moon-shell, .journal-card, .journal-reflection, .admin-booking-card,
  .practice-playground, .meditation-playground, .chakra-map, .mudra-figures figure, .birth-purpose,
  .hydration-calculator, .guide-benefits > div, .guide-try, .class-day-card,
  .moon-class-schedule .class-day-card, .class-flow-icon, .class-extras li, .kosha-layers li::before,
  .limbs-list li::before {
    background: var(--raised);
  } .menu:hover, .menu[aria-expanded="true"], .drawer-list > :where(li) > a:hover, .drawer-leo summary:hover,
  .resource-list a:hover, .panel, .botanical-panel, .garden-teaser, .year-overview,
  .practice-panel, .shop-product:nth-child(even), .class-day-card:nth-child(even),
  .moon-nav button:hover, .class-flow li, .pose:nth-child(3n), .surya-feature .pose:nth-child(3n),
  .kosha-layers li:nth-child(4), .limbs-list li:nth-child(4n + 3), .chant-note:nth-of-type(even) {
    background: var(--sagewash);
  }
  .breath-hub #move { background-color: var(--blush); }
  .breath-hub #calm-tools { background-color: #422f40; }
  .breath-hub #meditation-spaces { background-color: var(--lilac); }
  .pose, .enquiry-panel, .moon-day, .shop-product, .journal-month, .teaching-shelf, .phase-count,
  .guide-benefits > div:nth-child(even), #eight-limbs, #mudras {
    background: var(--sand);
  } .journal-section, .morning-panel, .pose:nth-child(4n), .surya-feature .pose:nth-child(4n),
  .class-flow li:nth-child(2), .kosha-layers li:nth-child(1), .limbs-list li:nth-child(4n + 1),
  .library-shelf.nutrition-shelf, .nutrition-note, .practice-guides-page :is(#yoga-benefits, #crow-pose) {
    background: var(--blush);
  } .evening-panel, .evening-card, .library-shelf:nth-child(4), .birth-chart-calculator,
  .class-flow li:nth-child(3), .moon-class-schedule .class-day-card:nth-child(even),
  .kosha-layers li:nth-child(5), .quote-note, .chant-note {
    background: var(--lilac);
  } .surya-poster, .surya-feature .pose, .big-three article, .meditation-playground .phase-count,
  .kosha-layers li:nth-child(2), .kosha-layers li:nth-child(3), .limbs-list li:nth-child(4n + 2) { background: var(--honey); }
  .library-sun-moon > div + div, .limbs-list li:nth-child(4n) { background: var(--blue); }
  .hydration-note, .hydration-result { background: var(--teal); }
  .big-three article:nth-child(3), .practice-guides-page #meditation-benefits { background: var(--sagewash); }
  .class-approach, .class-schedule { background: linear-gradient(125deg, var(--blush), var(--lilac)); }
  .evening-playground .phase-count, .big-three article:nth-child(2) { background: var(--lilac); }

  .enquiry-panel input, .enquiry-panel select, .enquiry-panel textarea, .moon-nav button,
  .year-control select, .moon-zone select, .prompt-tabs button, .journal-card textarea,
  .shop-photos button, .shop-basket-controls button, .booking-admin select,
  .dashboard-form :is(input, select, textarea), .dashboard-booking-edit :is(input, select),
  #birth-chart-form :is(input, select) {
    background: var(--paper);
    color: var(--ink);
    border-color: var(--line);
  } #birth-chart-form select:disabled { opacity: .65; }
  .button:not(.light), .duration button.active, .prompt-tabs button.active,
  .breath-paces button[aria-pressed="true"] {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
  } .top .top-cta:hover, .button:not(.light):hover { background: var(--sage); }
  :is(button, a, input, select, textarea, summary):focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }
  .moon-phase-highlight, .moon-tag { background: var(--sagewash); color: #d2e3c9; }
  .moon-phase-highlight.full, .moon-tag.full { background: var(--honey); color: #f4da9c; }
  .moon-class-tag, .moon-tag.sky { background: var(--lilac); color: #e5d5f2; }
  .moon-class-tag.held { background: var(--honey); color: #f4da9c; }
  .moon-class-schedule, .class-day-card li + li, .meditation-settings, .library-shelf li + li { border-color: var(--line); }

  .quote-note blockquote p, .quote-note figcaption, .class-flow-icon,
  .big-three h2 span { color: #e5d5f2; }
  .meditation-playground .meditation-step, .meditation-playground .meditation-phase,
  .surya-feature .pose b, #birth-chart-status { color: var(--clay); }
  .evening-playground :is(.meditation-step, .meditation-phase) { color: #e5d5f2; }
  #mudras-title, .mudra-figures figcaption strong, #weight-reading, .hydration-result output { color: #c2e3d3; }
  .retreat-content p { color: inherit; }
  .food-colour-card { background: var(--raised); }
  .food-colour-card h3 { color: var(--ink); }
  .nadi-sides { color: #293e33; }
  footer { background: #111a16; }
}

[data-theme="dark"] .home-sun { background: var(--honey); }



[data-theme="dark"] .family-programme {
  [data-breath-tone="gentle"] { --breath-card: var(--blush); }
  [data-breath-tone="nadi"] { --breath-card: var(--lilac); }
  [data-breath-tone="ujjayi"] { --breath-card: var(--blue); }
  [data-breath-tone="kids"] { --breath-card: var(--honey); }
  [data-breath-tone="move"] { --breath-card: var(--sagewash); }
}

.lotus-header {
  background:
    linear-gradient(106deg, #efbbd32e, #c3afe62b 31%, #a6d5dd30 57%, #bfdaa132 77%, #f9d5a74d),
    linear-gradient(var(--paper), var(--paper));
  box-shadow: inset 0 1px 0 #fff8, inset 0 -2px 0 #8c668316,
    0 4px 10px #54405a1a, 0 7px 18px #dca6ca24;
}

.app-navigation .brand-lotus {
  width: 27px;
  height: 27px;
  object-fit: contain;
  border-radius: 28%;
}

.app-navigation .practice-hold-cue {
  background: url('/images/app/golden-lotus.webp') center / 100% 100% no-repeat #f4e2ec;
  border-color: #ad8057;
  box-shadow:
    0 0 0 2px #fff5e7,
    0 0 0 4px #c8a2e5,
    0 0 14px 5px #bc8be291,
    0 5px 0 2px #74549280,
    0 8px 11px #51495b56;
}

.app-navigation .practice-hold-cue .brand-lotus,
.practice-hold-cue::after { display: none; }

.app-navigation .practice-hold-cue::before {
  inset: 0;
  height: auto;
  border: 0;
  border-radius: inherit;
  box-shadow: inset 0 2px 2px #fffc, inset 0 -3px 3px #79549d59;
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .app-navigation .practice-shortcut:is(:hover, :focus-visible) .practice-hold-cue {
    translate: 0 -2px;
  }

  .app-navigation .practice-shortcut:is(:active, .practice-pressing) .practice-hold-cue {
    translate: 0 2px;
  }
}


:is(a, button).back-icon-control:not([hidden]) {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--line) 76%, var(--ink));
  border-radius: 50%;
  color: var(--ink);
  background: linear-gradient(135deg, #f0c2db35, #d9c8f054 48%, #c7e4d053), var(--paper);
  box-shadow: inset 0 1px 0 #fff8, 0 2px 0 #775b7428, 0 4px 10px #cba3d14d;
  vertical-align: middle;
}

:is(a, button).back-icon-control:hover {
  background: linear-gradient(135deg, #f0c2db61, #d9c8f079 48%, #c7e4d07a), var(--paper);
}

.back-icon-control:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.drawer {
  background:
    linear-gradient(115deg, #efbbd31c, #c3afe620 30%, #a6d5dd20 55%, #bfdaa120 77%, #f9d5a72a),
    var(--paper);
}

.drawer .drawer-list { grid-template-columns: minmax(0, 1fr); }
.drawer .drawer-practice {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: repeat(5, minmax(48px, auto));
}
.drawer-practice > li:not(.drawer-leo) { grid-column: 1; }
.drawer-practice .drawer-leo { grid-row: 1 / span 5; }
.drawer-practice:has(.leo-guide[open]) .drawer-leo { width: min(41vw, 13rem); }

.drawer-list > :where(li) > a {
  min-height: 44px;
  padding-inline: 8px;
  font-size: .78rem;
  font-weight: 400;
  letter-spacing: .07em;
}
.drawer-list > :where(li) > a[aria-current] {
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: .25em;
  background: transparent;
}

.drawer-list > :where(li) > a[href="/the-space-between.html"][aria-current] { text-decoration: none; }

.drawer-practice .drawer-leo summary {
  width: 52px;
  margin-inline-start: auto;
  padding: 0;
  justify-content: center;
}
.drawer-practice .drawer-leo summary::after { display: none; }
.drawer-practice .drawer-leo summary img { width: 48px; height: 42px; }

.drawer-utilities { justify-content: end; }
.drawer-utilities .theme-toggle { margin-inline-start: 0; }
.drawer-install a[data-install-app]:not([hidden]) {
  width: 48px;
  min-height: 48px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
}
.drawer-install svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-dashboard .quote-note {
  max-width: none;
  padding: 12px clamp(14px, 4vw, 22px) 16px;
  background: linear-gradient(110deg, #e5efdf, #eff5e8 72%, #e6f1e4);
  border-color: #c5d8bd;
  border-radius: 20px;
  box-shadow: inset 0 1px 0 #fff9, 0 3px 10px #54725b17;
}
[data-theme="dark"] .home-dashboard .quote-note { background: #293e32; border-color: #506b57; }

.quote-note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.quote-note-header h3,
.quote-note blockquote p {
  margin: 0;
  font: inherit;
  line-height: 1.5;
  color: var(--ink);
}

.quote-note-header h3 { font-weight: 600; letter-spacing: .04em; }
.quote-action:not([hidden]) {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: color-mix(in srgb, var(--paper) 67%, transparent);
  color: var(--ink);
}
.quote-action:hover { border-color: var(--sage); }
.quote-action:focus-visible { outline: 2px solid var(--sage); outline-offset: 1px; }
.quote-action span { font: 1.3rem/1 Georgia, serif; color: var(--clay); }
.quote-note figcaption {
  gap: 3px 8px;
  font-size: .9rem;
  line-height: 1.45;
}

@media (min-width: 641px) {
  .home-dashboard .quote-note {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px 22px;
  }

  .quote-note-header { display: contents; }
  .quote-note-header h3 { grid-area: 1 / 1; }
  .quote-note-header .quote-action { grid-area: 1 / 2 / span 2; }
  .quote-note figure { grid-column: 1; }
}

.home-welcome h1 { line-height: 1.13; }
.home-welcome h1 em { margin-block-start: .05em; }

@media (min-width: 761px) {
  .home-welcome {
    grid-template-rows: 1fr auto auto 1fr;
    row-gap: 0;
  }

  .home-welcome-copy { grid-area: 2 / 1; }
  .home-welcome-portrait { grid-area: 1 / 2 / -1; }

  .home-welcome p {
    max-width: 49ch;
    margin-block-start: clamp(15px, 2vw, 22px);
    line-height: 1.58;
  }

  .home-welcome-actions {
    grid-area: 3 / 1;
    margin-block-start: 21px;
  }
}
