/**
 * HOME-VISUAL-RESET-V01 — last-loaded Home skin.
 * Brand tokens from web/shared/styles/lifeloveme-sacred-text.css.
 * Loaded after styles.css / sacred / branding / navigation / ask CSS.
 * High-specificity + light color-scheme so Safari cache, dark mode,
 * and leftover Home rules cannot restore the rejected 1A/1B look.
 */
html {
  color-scheme: light;
}

body.home-page {
  color-scheme: light;
  --llm-cream: #f7f1e3;
  --llm-ivory: #fbf8f1;
  --llm-paper: #fffdf8;
  --llm-gold: #c9a227;
  --llm-gold-soft: rgba(201, 162, 39, 0.22);
  --llm-saffron: #c76b2e;
  --llm-teal: #2a7a6e;
  --llm-indigo: #3d4f7a;
  --llm-lavender: #7b6ba8;
  --llm-ink: #1a1a2e;
  --llm-muted: #5c5a72;
  --home-flagship-max: 40rem;
  background:
    radial-gradient(1200px 520px at 50% -8%, rgba(201, 162, 39, 0.14), transparent 58%),
    linear-gradient(180deg, #fbf8f1 0%, #f7f1e3 42%, #f4efe3 100%) !important;
  color: var(--llm-ink) !important;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
}

body.home-page .home-shell,
body.home-page .home-shell.home-shell--ask-first {
  max-width: var(--home-flagship-max) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 1.1rem 1.15rem 2.8rem !important;
  gap: 1.15rem !important;
}

body.home-page #llm-brand-header-home,
body.home-page .llm-brand-header {
  display: flex !important;
  justify-content: center !important;
  margin: 0.15rem auto 0.2rem !important;
}

body.home-page .llm-brand-header__logo,
body.home-page .llm-brand-header--compact .llm-brand-header__logo {
  height: clamp(68px, 17vw, 100px) !important;
  max-width: min(280px, 72vw) !important;
  width: auto !important;
}

body.home-page .llm-brand-header__fallback {
  color: var(--llm-ink) !important;
}

body.home-page .home-brand {
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  background: none !important;
}

body.home-page .home-brand::before,
body.home-page .home-brand::after {
  content: none !important;
  display: none !important;
}

body.home-page .home-brand__title,
body.home-page .home-brand__name,
body.home-page .home-brand__logo {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Trail stays available but must not compete with logo or Ask */
body.home-page .home-trail-util,
body.home-page .llm-session-trail,
body.home-page .lifeloveme-trace-nav,
body.home-page .lifeloveme-back-nav {
  margin: 0 !important;
  padding: 0 !important;
  opacity: 1;
}

body.home-page .home-trail-util {
  display: flex;
  justify-content: center;
  min-height: 0;
}

body.home-page .lifeloveme-trace-nav-row {
  justify-content: center;
}

body.home-page .lifeloveme-back-button,
body.home-page .lifeloveme-trace-back,
body.home-page .lifeloveme-trace-menu-toggle {
  padding: 0.1rem 0.2rem !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  color: var(--llm-muted) !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
}

body.home-page .home-trail-util button:disabled {
  display: none !important;
}

/* —— Ask composer: one physical component —— */
body.home-page .home-ask.home-ask--bare,
body.home-page .home-ask.home-ask--primary,
body.home-page section.home-ask {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0.7rem !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: left !important;
}

body.home-page .home-ask__title,
body.home-page .home-shell--ask-first .home-ask--primary .home-ask__title {
  margin: 0 0 0.15rem !important;
  color: var(--llm-ink) !important;
  font-size: clamp(1.35rem, 4.4vw, 1.7rem) !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  line-height: 1.25 !important;
  text-transform: none !important;
  text-align: left !important;
}

body.home-page .home-ask__form,
body.home-page .home-ask__form--compose {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
}

body.home-page .home-ask__compose {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: stretch !important;
  width: 100% !important;
  min-height: 3.65rem !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid rgba(201, 162, 39, 0.42) !important;
  border-radius: 1.15rem !important;
  background: var(--llm-paper) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 28px rgba(26, 26, 46, 0.08) !important;
}

body.home-page .home-ask__compose:focus-within {
  border-color: rgba(42, 122, 110, 0.55) !important;
  box-shadow:
    0 0 0 3px rgba(42, 122, 110, 0.14),
    0 12px 30px rgba(26, 26, 46, 0.1) !important;
}

body.home-page #home-ask-input,
body.home-page .home-ask__compose input[type="text"],
body.home-page .home-ask__compose input[type="search"] {
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 3.65rem !important;
  margin: 0 !important;
  padding: 0.95rem 0.65rem 0.95rem 1.2rem !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--llm-ink) !important;
  font-family: inherit !important;
  font-size: 1.08rem !important;
  line-height: 1.35 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

body.home-page #home-ask-input::placeholder {
  color: #8a86a0 !important;
  opacity: 1 !important;
}

body.home-page #home-ask-submit,
body.home-page .home-ask__submit,
body.home-page .home-ask--primary .home-ask__submit,
body.home-page .home-ask__submit--arrow,
body.home-page .home-shell--ask-first .home-ask__submit {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  z-index: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important;
  width: 2.7rem !important;
  min-width: 2.7rem !important;
  height: 2.7rem !important;
  min-height: 2.7rem !important;
  margin: 0 0.48rem 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0.85rem !important;
  background: var(--llm-teal) !important;
  background-image: none !important;
  box-shadow: 0 6px 14px rgba(42, 122, 110, 0.28) !important;
  color: #fffdf8 !important;
  font-size: 1.2rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  transform: none !important;
}

body.home-page #home-ask-submit:hover,
body.home-page #home-ask-submit:active,
body.home-page .home-ask__submit--arrow:hover,
body.home-page .home-ask__submit--arrow:active,
body.home-page .home-ask--primary .home-ask__submit:hover,
body.home-page .home-ask--primary .home-ask__submit:active {
  background: #24685e !important;
  transform: none !important;
  filter: none !important;
}

body.home-page .home-ask__chips,
body.home-page .home-ask__prompts,
body.home-page #home-ask-prompt-chips {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.35rem 0.85rem !important;
  margin: 0.2rem 0 0 !important;
  justify-content: flex-start !important;
}

body.home-page .home-ask__chip {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  color: var(--llm-muted) !important;
  font-size: 0.88rem !important;
  text-decoration: underline;
  text-decoration-color: rgba(201, 162, 39, 0.45);
  text-underline-offset: 0.18em;
}

/* —— Results: light surface under Ask; no giant dark panel —— */
body.home-page #home-ask-results:empty {
  display: none !important;
  margin: 0 !important;
  min-height: 0 !important;
}

body.home-page .ask-card,
body.home-page .ask-card--onboarding,
body.home-page .ask-card--helpers,
body.home-page .ask-card--wellness,
body.home-page .ask-card--practice,
body.home-page .home-shell--ask-first .ask-card,
body.home-page .home-shell--ask-first .ask-card--onboarding {
  max-width: none !important;
  margin: 0.55rem 0 0 !important;
  padding: 1rem 1.05rem 1.05rem !important;
  border: 1px solid var(--llm-gold-soft) !important;
  border-radius: 1rem !important;
  background: var(--llm-paper) !important;
  box-shadow: 0 8px 22px rgba(26, 26, 46, 0.05) !important;
  color: var(--llm-ink) !important;
}

body.home-page .ask-card::before,
body.home-page .ask-card--onboarding::before {
  content: none !important;
  display: none !important;
}

body.home-page .ask-card h2,
body.home-page .ask-card h3,
body.home-page .ask-card p,
body.home-page .ask-card li,
body.home-page .ask-card a:not(.ask-card__action) {
  color: var(--llm-ink) !important;
}

body.home-page .ask-card__actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.45rem !important;
  margin-top: 0.85rem !important;
}

body.home-page .ask-card__btn,
body.home-page .ask-card__action,
body.home-page .ask-card__btn--ghost,
body.home-page .ask-card__btn--secondary-primary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 2.4rem !important;
  padding: 0.45rem 0.9rem !important;
  border-radius: 999px !important;
  border: 1px solid rgba(26, 26, 46, 0.12) !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--llm-indigo) !important;
  font-size: 0.92rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

body.home-page .ask-card__btn--recommended,
body.home-page .ask-card__action--primary,
body.home-page a.ask-card__action.ask-card__action--primary {
  border-color: transparent !important;
  background: var(--llm-teal) !important;
  color: #fffdf8 !important;
}

body.home-page .ask-card--onboarding .ask-card__btn--recommended::before {
  content: none !important;
}

body.home-page .ask-feedback {
  color: var(--llm-muted) !important;
}

/* —— Four doors: intentional 2×2 objects —— */
body.home-page .home-doors {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 0.7rem !important;
  width: 100% !important;
  margin: 0.15rem 0 0 !important;
}

body.home-page .home-doors__item {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: flex-start !important;
  gap: 0.18rem !important;
  min-height: 5.15rem !important;
  padding: 0.85rem 0.95rem !important;
  border: 1px solid rgba(201, 162, 39, 0.28) !important;
  border-radius: 1rem !important;
  background: var(--llm-paper) !important;
  box-shadow: 0 6px 16px rgba(26, 26, 46, 0.045) !important;
  color: var(--llm-ink) !important;
  text-decoration: none !important;
  text-align: left !important;
}

body.home-page .home-doors__item[hidden] {
  display: none !important;
}

body.home-page .home-doors__label {
  display: block;
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

body.home-page .home-doors__desc {
  display: block;
  color: var(--llm-muted);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

body.home-page .home-doors__item--practice {
  box-shadow: inset 3px 0 0 var(--llm-teal), 0 6px 16px rgba(26, 26, 46, 0.045);
}

body.home-page .home-doors__item--wisdom {
  box-shadow: inset 3px 0 0 var(--llm-gold), 0 6px 16px rgba(26, 26, 46, 0.045);
}

body.home-page .home-doors__item--help {
  box-shadow: inset 3px 0 0 var(--llm-saffron), 0 6px 16px rgba(26, 26, 46, 0.045);
}

body.home-page .home-doors__item--space {
  box-shadow: inset 3px 0 0 var(--llm-lavender), 0 6px 16px rgba(26, 26, 46, 0.045);
}

body.home-page .home-explore-entry {
  margin: 0.1rem 0 0.15rem !important;
  text-align: left !important;
}

body.home-page .home-explore-entry a {
  display: inline !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  color: var(--llm-indigo) !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

body.home-page .home-explore-entry a:hover {
  color: var(--llm-teal) !important;
}

/* —— Recent: custom compact disclosure, never browser-default —— */
body.home-page .home-lfm-memory {
  margin: 0.1rem 0 0 !important;
}

body.home-page .home-lfm-recent-wrap {
  margin: 0 !important;
}

body.home-page .home-recent-master {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.28rem !important;
  margin: 0 !important;
  padding: 0.15rem 0 !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  color: var(--llm-muted) !important;
  font-family: inherit !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  cursor: pointer;
}

body.home-page .home-recent-master__chevron {
  font-size: 0.72em;
  transition: transform 0.16s ease;
}

body.home-page .home-recent-master[aria-expanded="true"] .home-recent-master__chevron {
  transform: rotate(180deg);
}

body.home-page .home-lfm-recent-panel {
  margin-top: 0.45rem;
}

body.home-page .home-lfm-recent-tree,
body.home-page .home-lfm-tree {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.2rem !important;
  margin: 0 !important;
  padding: 0.15rem 0 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body.home-page .home-lfm-tree__cat,
body.home-page .home-lfm-tree__group {
  border: 0 !important;
  background: transparent !important;
}

body.home-page .home-lfm-tree__toggle,
body.home-page .home-lfm-tree__header,
body.home-page .home-lfm-tree summary {
  display: flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0.28rem 0 !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  color: var(--llm-ink) !important;
  font-family: inherit !important;
  font-size: 0.92rem !important;
  font-weight: 650 !important;
  text-align: left !important;
  list-style: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  cursor: pointer;
}

body.home-page .home-lfm-tree__count {
  color: var(--llm-muted);
  font-weight: 500;
  font-size: 0.82em;
}

body.home-page .home-lfm-tree summary::-webkit-details-marker,
body.home-page .home-lfm-tree summary::marker {
  display: none;
  content: "";
}

body.home-page .home-lfm-tree__items {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.15rem !important;
  margin: 0 0 0.35rem !important;
  padding: 0 0 0 0.15rem !important;
}

body.home-page .home-lfm-tree__item,
body.home-page a.home-lfm-tree__item {
  display: block !important;
  padding: 0.28rem 0 !important;
  border: 0 !important;
  background: none !important;
  color: var(--llm-indigo) !important;
  font-size: 0.9rem !important;
  text-decoration: none !important;
}

body.home-page .home-author-tools {
  display: none !important;
}

body.home-page .home-footer,
body.home-page .home-footer--compact {
  margin-top: 1.4rem !important;
  opacity: 0.55;
}

body.home-page .home-footer .footer-link {
  color: var(--llm-muted) !important;
  font-size: 0.85rem !important;
}

@media (min-width: 720px) {
  body.home-page .home-shell,
  body.home-page .home-shell.home-shell--ask-first {
    padding-top: 1.6rem !important;
    gap: 1.3rem !important;
  }

  body.home-page .home-ask__compose,
  body.home-page #home-ask-input,
  body.home-page .home-ask__compose input[type="text"] {
    min-height: 4rem !important;
  }
}

/* Dark-mode cannot restore navy/teal-on-black Ask cards */
@media (prefers-color-scheme: dark) {
  body.home-page,
  body.home-page .home-shell {
    background:
      radial-gradient(1200px 520px at 50% -8%, rgba(201, 162, 39, 0.14), transparent 58%),
      linear-gradient(180deg, #fbf8f1 0%, #f7f1e3 42%, #f4efe3 100%) !important;
    color: #1a1a2e !important;
  }

  body.home-page .ask-card,
  body.home-page .ask-card--onboarding,
  body.home-page .ask-card--helpers,
  body.home-page .home-ask__compose {
    background: #fffdf8 !important;
    color: #1a1a2e !important;
    border-color: rgba(201, 162, 39, 0.42) !important;
  }

  body.home-page .ask-card__btn,
  body.home-page .ask-card__btn--ghost,
  body.home-page .ask-card__btn--secondary-primary {
    background: transparent !important;
    color: #3d4f7a !important;
    border-color: rgba(26, 26, 46, 0.12) !important;
  }

  body.home-page .ask-card__btn--recommended {
    background: #2a7a6e !important;
    color: #fffdf8 !important;
    border-color: transparent !important;
  }

  body.home-page .ask-card h2,
  body.home-page .ask-card p,
  body.home-page .ask-card li,
  body.home-page .home-brand__name,
  body.home-page .home-ask__title,
  body.home-page .home-doors__label {
    color: #1a1a2e !important;
  }
}
