/* Today + Recovery route consistency correction — owner-only rebuild, 2026-09-18. */

:is(
  #today .today-route-bar,
  .fellowship-experience .fellowship-bar,
  .recovery-tools-experience .recovery-tools-bar,
  #recovery .recovery-journey-bar,
  .profile-experience .profile-bar,
  .milestone-experience .milestone-bar
){
  box-sizing:border-box;
  min-height:calc(72px + env(safe-area-inset-top))!important;
  padding:max(10px,env(safe-area-inset-top)) 14px 10px!important;
  display:grid!important;
  grid-template-columns:72px minmax(0,1fr) 72px!important;
  gap:8px!important;
  align-items:center!important;
}

:is(
  #today .today-route-bar,
  .fellowship-experience .fellowship-bar,
  .recovery-tools-experience .recovery-tools-bar,
  #recovery .recovery-journey-bar,
  .profile-experience .profile-bar,
  .milestone-experience .milestone-bar
) button{
  box-sizing:border-box;
  min-width:0!important;
  min-height:44px!important;
  padding:0 2px!important;
  border:0;
  background:transparent;
  font-family:Arial,Helvetica,sans-serif!important;
  font-size:13px!important;
  font-weight:900!important;
  line-height:1.1!important;
  letter-spacing:0!important;
  white-space:nowrap!important;
}

:is(
  #today .today-route-bar,
  .fellowship-experience .fellowship-bar,
  .recovery-tools-experience .recovery-tools-bar,
  #recovery .recovery-journey-bar,
  .profile-experience .profile-bar,
  .milestone-experience .milestone-bar
) > span{
  min-width:0!important;
  text-align:center!important;
}

:is(
  #today .today-route-bar,
  .fellowship-experience .fellowship-bar,
  .recovery-tools-experience .recovery-tools-bar,
  #recovery .recovery-journey-bar,
  .profile-experience .profile-bar,
  .milestone-experience .milestone-bar
) > span :is(b,small),
#today .today-route-bar > span :is(b,small){
  display:block!important;
  max-width:100%!important;
  font-family:Arial,Helvetica,sans-serif!important;
  font-size:13px!important;
  font-weight:900!important;
  line-height:1.18!important;
  letter-spacing:.045em!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  hyphens:none!important;
  white-space:normal!important;
}

:is(
  #today .today-route-bar,
  .fellowship-experience .fellowship-bar,
  .recovery-tools-experience .recovery-tools-bar,
  #recovery .recovery-journey-bar,
  .profile-experience .profile-bar,
  .milestone-experience .milestone-bar
) > span small{
  margin-top:3px!important;
}

:is(
  #today .today-route-bar,
  .fellowship-experience .fellowship-bar,
  .recovery-tools-experience .recovery-tools-bar,
  #recovery .recovery-journey-bar,
  .profile-experience .profile-bar,
  .milestone-experience .milestone-bar
) button:focus-visible{
  outline:3px solid currentColor!important;
  outline-offset:2px!important;
}

/* Full-screen Today children use application chrome outside the photograph. */
#today .today-wire-panel:is(.nonneg-page,.checkin-page){
  padding-top:0!important;
  scrollbar-width:none;
}

#today .today-wire-panel:is(.nonneg-page,.checkin-page)::-webkit-scrollbar{display:none}

#today .today-route-bar{
  position:sticky;
  top:0;
  z-index:40;
  margin:0 -18px 18px;
  border-bottom:1px solid rgba(196,249,255,.18);
  background:linear-gradient(145deg,#0d3448 0%,#071d2b 62%,#06131c 100%);
  color:#fffdf7;
  box-shadow:0 8px 20px rgba(5,26,37,.18),inset 0 1px 0 rgba(255,255,255,.08);
}

#today .today-route-bar button:first-child{text-align:left}
#today .today-route-bar button:last-child{text-align:right}
#today .today-route-bar button{color:#fffdf7!important}
#today .today-route-bar > span b{color:#fffdf7}
#today .today-route-bar > span small{color:#c4f9ff}

#today .today-wire-panel:is(.nonneg-page,.checkin-page) .trial-title{
  scroll-margin-top:calc(92px + env(safe-area-inset-top));
}

/* Non-Negotiables choices are ordinary Today controls, not dark console panels. */
#today .today-wire-panel.nonneg-page :is(.nn-choice,.nn-item),
#today .today-wire-panel.nonneg-page :is(.nn-choice,.nn-item).tone-violet,
#today .today-wire-panel.nonneg-page :is(.nn-choice,.nn-item).tone-teal,
#today .today-wire-panel.nonneg-page :is(.nn-choice,.nn-item).tone-blue,
#today .today-wire-panel.nonneg-page :is(.nn-choice,.nn-item).tone-coral{
  border:1px solid rgba(75,91,89,.22)!important;
  background:linear-gradient(145deg,#fffdf7 0%,#f2eee5 58%,#e4ddd1 100%)!important;
  color:#18211f!important;
  box-shadow:0 8px 17px rgba(36,50,48,.11),inset 2px 2px 0 rgba(255,255,255,.84),inset -2px -2px 0 rgba(120,111,95,.08)!important;
}

#today .today-wire-panel.nonneg-page :is(.nn-choice-icon,.nn-item-icon){
  border-color:rgba(32,145,190,.28)!important;
  background:linear-gradient(145deg,#f9f7f1,#e3ded4)!important;
  color:#146f97!important;
  box-shadow:inset 1px 1px 0 #fff,0 3px 7px rgba(15,36,43,.1)!important;
}

#today .today-wire-panel.nonneg-page :is(.nn-choice-copy b,.nn-name){
  color:#18211f!important;
  font-size:16px!important;
  line-height:1.22!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  hyphens:none!important;
}

#today .today-wire-panel.nonneg-page :is(.nn-choice-copy small,.nn-note){
  color:#5f6e6a!important;
  font-size:13px!important;
  line-height:1.36!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  hyphens:none!important;
}

#today .today-wire-panel.nonneg-page :is(.nn-choice-state,.nn-check){
  border-color:rgba(45,80,90,.45)!important;
  background:#f8f5ee!important;
  color:#135f86!important;
}

#today .today-wire-panel.nonneg-page :is(.nn-choice.on,.nn-item.done){
  border:2px solid #258fc3!important;
  background:linear-gradient(145deg,#f4ffff 0%,#eaf8fb 55%,#e1edf3 100%)!important;
  color:#14252b!important;
  box-shadow:0 9px 18px rgba(20,90,123,.13),inset 2px 2px 0 rgba(255,255,255,.9),inset -2px -2px 0 rgba(53,110,134,.08)!important;
}

#today .today-wire-panel.nonneg-page :is(.nn-choice.on,.nn-item.done) :is(.nn-choice-state,.nn-check){
  border-color:#187fb1!important;
  background:linear-gradient(180deg,#42daf2,#168fd0)!important;
  color:#062332!important;
}

#today .today-wire-panel.nonneg-page :is(.nn-choice.on,.nn-item.done) :is(.nn-choice-copy b,.nn-name){
  color:#14252b!important;
}

#today .today-wire-panel.nonneg-page :is(.nn-choice.on,.nn-item.done) :is(.nn-choice-copy small,.nn-note){
  color:#49646d!important;
}

#today .today-wire-panel.nonneg-page :is(.nn-section-heading small,.nn-picker-summary span,.nn-main-section-label small){
  font-size:13px!important;
}

/* Morning Recovery: one complete editorial photograph with a controlled Today-blue light field. */
.fellowship-screen:not(.evening-flow) .fellowship-morning-overview-hero{
  min-height:248px!important;
  background:#071d2b!important;
}

.fellowship-screen:not(.evening-flow) .fellowship-morning-overview-hero::after{
  background:
    linear-gradient(90deg,rgba(3,17,25,.92) 0%,rgba(4,24,35,.76) 38%,rgba(5,25,36,.3) 64%,rgba(5,21,31,.04) 100%),
    linear-gradient(180deg,rgba(3,17,25,.08),rgba(3,17,25,.17))!important;
}

.fellowship-screen:not(.evening-flow) .fellowship-morning-overview-hero img{
  object-fit:cover!important;
  object-position:70% 52%!important;
  filter:contrast(1.08) brightness(.82) saturate(.96)!important;
  transform:scale(1.01)!important;
}

.fellowship-screen:not(.evening-flow) .fellowship-morning-overview-copy{
  min-height:248px!important;
  width:min(68%,270px)!important;
}

/* Sticky headers never cover a route heading after focus or browser restoration. */
:is(
  .fellowship-screen,
  .recovery-tools-screen,
  .recovery-journey,
  .profile-screen,
  .milestone-screen
) :is(h1,h2,h3,[tabindex="-1"]){
  scroll-margin-top:calc(96px + env(safe-area-inset-top));
}

@media(max-width:430px){
  #today .today-route-bar{margin-right:-18px;margin-left:-18px}
}

@media(max-width:390px){
  #today .today-route-bar{margin-right:-15px;margin-left:-15px}
}

@media(max-width:360px){
  :is(
    #today .today-route-bar,
    .fellowship-experience .fellowship-bar,
    .recovery-tools-experience .recovery-tools-bar,
    #recovery .recovery-journey-bar,
    .profile-experience .profile-bar,
    .milestone-experience .milestone-bar
  ){
    min-height:calc(102px + env(safe-area-inset-top))!important;
    padding:max(8px,env(safe-area-inset-top)) 12px 8px!important;
    grid-template-columns:1fr 1fr!important;
    grid-template-rows:auto 44px!important;
    column-gap:14px!important;
    row-gap:3px!important;
  }

  :is(
    #today .today-route-bar,
    .fellowship-experience .fellowship-bar,
    .recovery-tools-experience .recovery-tools-bar,
    #recovery .recovery-journey-bar,
    .profile-experience .profile-bar,
    .milestone-experience .milestone-bar
  ) > span{
    grid-column:1 / -1!important;
    grid-row:1!important;
  }

  :is(
    #today .today-route-bar,
    .fellowship-experience .fellowship-bar,
    .recovery-tools-experience .recovery-tools-bar,
    #recovery .recovery-journey-bar,
    .profile-experience .profile-bar,
    .milestone-experience .milestone-bar
  ) > button:first-child{
    grid-column:1!important;
    grid-row:2!important;
    justify-self:start!important;
    width:100%!important;
    text-align:left!important;
  }

  :is(
    #today .today-route-bar,
    .fellowship-experience .fellowship-bar,
    .recovery-tools-experience .recovery-tools-bar,
    #recovery .recovery-journey-bar,
    .profile-experience .profile-bar,
    .milestone-experience .milestone-bar
  ) > button:last-child{
    grid-column:2!important;
    grid-row:2!important;
    justify-self:end!important;
    width:100%!important;
    text-align:right!important;
  }

  #today .today-route-bar{margin-right:-12px;margin-left:-12px}

  .fellowship-screen:not(.evening-flow) .fellowship-morning-overview-hero,
  .fellowship-screen:not(.evening-flow) .fellowship-morning-overview-copy{
    min-height:234px!important;
  }
}

@media(max-height:620px) and (orientation:landscape){
  .fellowship-screen:not(.evening-flow) .fellowship-morning-overview-hero,
  .fellowship-screen:not(.evening-flow) .fellowship-morning-overview-copy{
    min-height:214px!important;
  }
}

@media(prefers-reduced-motion:reduce){
  :is(#today .today-route-bar,.fellowship-bar,.recovery-tools-bar,.recovery-journey-bar,.profile-bar,.milestone-bar),
  .fellowship-morning-overview-hero img{
    scroll-behavior:auto!important;
    transition:none!important;
  }
}

@media(forced-colors:active){
  :is(#today .today-route-bar,.fellowship-bar,.recovery-tools-bar,.recovery-journey-bar,.profile-bar,.milestone-bar){
    border-bottom:1px solid CanvasText!important;
    forced-color-adjust:auto;
  }

  .fellowship-screen:not(.evening-flow) :is(
    .fellowship-morning-overview-hero,
    .fellowship-reading-hero,
    .fellowship-prayer-hero,
    .fellowship-meditation-hero,
    .fellowship-gratitude-hero
  ){
    border:2px solid CanvasText!important;
  }
}
