:root {
  color-scheme: only light;
  --font-sans: "Onest", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --color-foreground: #111827;
  --color-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-brand: #ff7a00;
  --color-primary: #171717;
  --color-panel: #f9fafb;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: #fff;
  color: var(--color-foreground);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

/* Same column as AppShell shellPad / shellCol */
.shell {
  width: 100%;
  max-width: 64rem; /* max-w-5xl */
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 640px) {
  .shell {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Full-bleed bar like AppShell <header class="w-full border-b"> */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  border-bottom: 1px solid var(--color-border);
  background: #fff;
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  height: 3.5rem;
}
@media (min-width: 640px) {
  .site-header-inner { height: 4rem; }
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.brand img { width: 2rem; height: 2rem; border-radius: 0.5rem; }
.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: #6b7280;
}
.nav > a,
.about-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 2.5rem;
  padding: 0 0.35rem;
  text-decoration: none;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
  list-style: none;
}
.nav > a:hover,
.about-summary:hover { color: #111827; }
.about-summary::-webkit-details-marker { display: none; }
.about-chevron {
  width: 1rem;
  height: 1rem;
  transition: transform 0.15s ease;
}
.about[open] .about-chevron { transform: rotate(180deg); }
.about { position: relative; }
.about-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.25rem); /* mt-1 */
  z-index: 50;
  min-width: 16rem;
  padding: 0.375rem; /* p-1.5 */
  border: 1px solid #e5e5e5; /* border-neutral-200 */
  border-radius: 1rem; /* rounded-2xl */
  background: #fff;
}
.about-menu a {
  display: block;
  border-radius: 0.75rem; /* rounded-xl */
  padding: 0.625rem 0.75rem; /* py-2.5 px-3 */
  font-size: 0.875rem;
  color: #4b5563; /* text-gray-600 */
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.about-menu a:hover {
  background: #f5f5f5; /* hover:bg-neutral-100 */
  color: #111827;
}

.article {
  padding: 1.5rem 0 1rem; /* bottom spacing handed to .blog-cta */
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
@media (min-width: 640px) {
  .article {
    padding: 2.5rem 0 1.25rem;
    gap: 2.5rem;
  }
}
/* Index list: full shell width. Post pages keep .prose-col centered. */
.article.blog-index {
  gap: 0;
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

/* Reading column centered on article pages; ritual stays full shell width. */
.prose-col {
  width: 100%;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}
.back {
  display: inline-block;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  color: #a3a3a3;
  text-decoration: none;
}
.back:hover { color: #404040; }
h1 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0;
  color: #111827;
}
@media (min-width: 640px) {
  h1 { font-size: 1.5rem; }
}
.lead {
  color: var(--color-muted);
  font-size: 1rem;
  line-height: 1.75;
  margin: 0.75rem 0 0; /* appPageLeadClass: mt-3 */
}
.prose {
  color: #737373;
  font-size: 0.875rem;
  line-height: 1.75;
}
@media (min-width: 640px) {
  .prose { font-size: 0.9375rem; }
}
.prose p { margin: 0 0 1.25rem; }
.prose p:last-child { margin-bottom: 0; }
.prose h2 {
  margin: 2rem 0 0.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #737373;
}
.prose a { text-decoration: underline; text-underline-offset: 2px; }

/* Ritual: full shell width (same as SPA BlogRitualEmbed) */
.ritual {
  position: relative;
  margin: 0;
}
.ritual-stage { position: relative; }
.ritual-support {
  font-size: 1rem;
  line-height: 1.75;
  color: #262626;
  margin: 0 0 1.25rem;
}
.ritual-steps {
  margin: 0 0 1.25rem;
  padding: 1.15rem 1.15rem 1.15rem 2.25rem;
  border: 1px solid #e5e5e5;
  border-radius: 1rem;
  color: #262626;
  font-size: 1.0625rem;
  line-height: 1.55;
  background: #fafafa;
}
.ritual-steps li { margin: 0 0 0.85rem; }
.ritual-steps li:last-child { margin-bottom: 0; }
.ritual.is-enhanced .ritual-steps {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
  white-space: nowrap;
}

.ritual-progress {
  display: flex;
  gap: 0.375rem;
  margin-bottom: 1rem;
  padding: 0 0.15rem;
}
.ritual-progress-seg {
  flex: 1;
  height: 0.25rem;
  border: 0;
  padding: 0;
  border-radius: 999px;
  background: rgba(212, 212, 212, 0.8);
  cursor: pointer;
  overflow: hidden;
}
.ritual-progress-seg.on,
.ritual-progress-seg.done { background: var(--color-brand); }
.ritual-progress-seg.done { opacity: 0.7; }

/* Match InMomentVariantView stepCardSizeClass (embed / grow) */
.ritual-card {
  position: relative;
  border: 1px solid rgba(212, 212, 212, 0.9);
  border-radius: 1rem;
  min-height: 13.5rem;
  height: min(42vh, 20rem);
  background: #fff;
  overflow: hidden;
  user-select: none;
  outline: none;
}
@media (min-width: 640px) {
  .ritual-card {
    height: auto;
    min-height: 32vh;
  }
}
.ritual-tap {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.ritual-tap:disabled { cursor: default; }
.ritual-tap-back { left: 0; width: 33%; }
.ritual-tap-next { right: 0; width: 67%; }
.ritual-card-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  height: 100%;
  min-height: inherit;
  padding: 1.5rem;
  pointer-events: none;
}
@media (min-width: 640px) {
  .ritual-card-body { padding: 2.5rem 2rem; gap: 1.25rem; }
}
.ritual-step-text {
  margin: 0;
  max-width: 65ch;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 2rem;
  letter-spacing: -0.02em;
  color: #171717;
}
@media (min-width: 640px) {
  .ritual-step-text {
    font-size: 1.5rem;
    line-height: 2.25rem;
  }
}
.ritual-step-count {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #737373;
}

.ritual-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  gap: 0.75rem;
}
.ritual-back,
.ritual-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 0.75rem;
  border: 0;
  min-height: 2.5rem;
  padding: 0 0.75rem;
  touch-action: manipulation;
}
@media (min-width: 640px) {
  .ritual-back,
  .ritual-next { min-height: 2rem; }
}
.ritual-back {
  background: transparent;
  color: #4b5563;
}
.ritual-back:hover { background: #f5f5f5; color: #111827; }
.ritual-back:disabled { opacity: 0.5; cursor: default; }
.ritual-next {
  background: var(--color-primary);
  color: #fff;
  flex-shrink: 0;
}
.ritual-next:hover { background: #262626; }

/* Overlay gate — same idea as BlogRitualEmbed */
.ritual-gate {
  margin-top: 1rem;
  border: 1px solid #e5e5e5;
  border-radius: 0.75rem;
  padding: 1.25rem;
  text-align: center;
  background: #fff;
}
.ritual.is-enhanced .ritual-gate:not(.is-open) { display: none; }
.ritual.is-enhanced .ritual-gate.is-open {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0.75rem;
  background: transparent;
  text-align: center;
}
@media (min-width: 640px) {
  .ritual.is-enhanced .ritual-gate.is-open { padding: 1.25rem; }
}
.ritual.is-complete .ritual-stage {
  pointer-events: none;
  user-select: none;
  opacity: 0.25;
}
.ritual-gate-card {
  width: 100%;
  max-width: 28rem;
  border: 1px solid #e5e5e5;
  border-radius: 0.75rem;
  padding: 1.25rem;
  background: #fff;
}
@media (min-width: 640px) {
  .ritual-gate-card { padding: 1.5rem; }
}
.ritual-gate-card p {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: #404040;
}
.ritual-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
@media (min-width: 640px) {
  .ritual-gate-actions { flex-direction: row; }
}
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  text-decoration: none;
  border-radius: 0.75rem;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}
.btn-primary { background: #171717; color: #fff; }
.btn-outline {
  border: 1px solid #d4d4d4;
  color: #171717;
  background: #fff;
}

.list { list-style: none; padding: 0; margin: 2.5rem 0 0; display: flex; flex-direction: column; gap: 1.25rem; }
.list a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  padding: 1rem 1.125rem;
  border: 1px solid #e5e5e5;
  border-radius: 0.75rem;
  margin: 0;
  text-decoration: none;
  background: #fff;
  text-align: left;
  transition: background-color 0.15s ease;
  touch-action: manipulation;
}
.list a:hover { background: #fafafa; }
.list a:active { background: #f5f5f5; }
.list h2 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: #111827;
}
.list p {
  margin: 0.35rem 0 0;
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.5;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 1.75rem 0 0;
  padding-top: 0.25rem;
}
.pager-status {
  font-size: 0.875rem;
  color: #6b7280;
  white-space: nowrap;
}
.pager-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid #e5e5e5;
  border-radius: 0.75rem;
  background: #fff;
  color: #171717;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  touch-action: manipulation;
}
.pager-link:hover { background: #fafafa; }
.pager-link-disabled {
  color: #a3a3a3;
  pointer-events: none;
  background: #fafafa;
}
.muted { color: #737373; }

.site-footer {
  margin-top: auto;
  width: 100%;
  background: #f5f5f5;
}
.site-footer-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #4b5563;
}
@media (min-width: 640px) {
  .site-footer-inner { padding: 1.5rem; }
}
.site-footer a {
  text-decoration: underline;
  text-decoration-color: #d4d4d4;
  text-underline-offset: 2px;
}
.site-footer a:hover { text-decoration-color: #171717; }
.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 0.85rem;
  margin-top: 0.75rem;
}
.site-footer-meta {
  margin-top: 0.75rem;
  color: #9ca3af;
}

.blog-cta {
  width: 100%;
  margin: 0;
  /* Clear gap from article above and footer below (all breakpoints) */
  padding: 3rem 1rem 2.5rem;
}
@media (min-width: 640px) {
  .blog-cta {
    padding: 4rem 1.5rem 3rem;
  }
}
.blog-cta-band {
  width: 100%;
  max-width: 64rem;
  margin-left: auto;
  margin-right: auto;
  background: #f5f5f5;
  border-radius: 1.5rem; /* rounded-3xl — phone and desktop */
  padding: 2.5rem 1.25rem;
}
@media (min-width: 640px) {
  .blog-cta-band {
    padding: 3.5rem 2.5rem;
  }
}
@media (min-width: 1024px) {
  .blog-cta-band {
    padding: 4rem 3rem;
  }
}
.blog-cta-inner {
  width: 100%;
  max-width: 36rem; /* max-w-xl */
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.blog-cta-inner h2 {
  margin: 0;
  font-size: 1.375rem; /* slightly smaller on phone so long title wraps calmly */
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.3;
  color: #111827;
  max-width: 22rem;
}
@media (min-width: 640px) {
  .blog-cta-inner h2 {
    font-size: 1.875rem; /* sm:text-3xl */
    max-width: none;
    line-height: 1.25;
  }
}
.blog-cta-inner > p:first-of-type {
  margin: 1rem 0 0;
  max-width: 28rem; /* max-w-md */
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #4b5563;
}
@media (min-width: 640px) {
  .blog-cta-inner > p:first-of-type {
    margin-top: 1.5rem;
    font-size: 1rem;
    line-height: 1.75;
  }
}
.blog-cta-btn {
  margin-top: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 24rem; /* max-w-sm */
  min-height: 52px;
  padding: 0 1.5rem;
  border: none;
  border-radius: 0.75rem;
  background: #ff7a00;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  touch-action: manipulation;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.blog-cta-btn:hover {
  background: #ff7a00;
  filter: brightness(0.97);
}
.blog-cta-btn:active {
  transform: scale(0.98);
}
@media (min-width: 640px) {
  .blog-cta-btn {
    margin-top: 2.5rem;
  }
}
.blog-cta-note {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: #6b7280;
}

.page {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
}
.page-main {
  flex: 1;
  width: 100%;
}
