/* Refined Aurora Home: one next step, two destinations, details on demand.
   This layer changes presentation only; account, consent and session engines
   retain ownership. Existing Light/Dark/System and accessibility choices apply. */
body:not(.is-marketing) > .pwa-intro { display: none !important; }
.app-shell[data-active-view=home] { background: var(--mc-pearl); }
.app-shell[data-active-view=home] .app-main { background: transparent; }
.app-shell [data-view=home] {
  width: 100%; max-width: 780px; margin-inline: auto; gap: 0;
}
.app-shell [data-view=home] .today-header {
  margin: 12px 0 30px; padding: 0; border: 0; align-items: center; gap: 16px;
}
.app-shell [data-view=home] .today-header h1 {
  font-size: clamp(1.5rem,3vw,2rem); font-weight: 650;
  letter-spacing: -.035em; line-height: 1.25; overflow-wrap: anywhere;
}
.app-shell [data-view=home] .today-header__copy {
  margin-top: 8px; font-size: .9375rem; line-height: 1.6; color: var(--mc-ink-secondary);
}
.app-shell [data-view=home] .page-kicker { margin-bottom: 10px; color: var(--mc-ink-secondary); }
.app-shell .mc-day-route:empty { display: none; }
.app-shell .mc-home-calm { gap: 16px; }
.app-shell .mc-home-calm > :is(nav,details) { width: 100%; }
.app-shell .mc-home-calm > .mc-clarity {
  padding: 28px; border: 1px solid var(--mc-line); border-radius: 12px;
  background: var(--mc-surface); box-shadow: none; overflow: visible;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.app-shell .mc-clarity .today-next__body {
  display: grid; grid-template-columns: minmax(0,1fr) 190px;
  align-items: center; gap: 28px; padding: 0;
}
.app-shell .mc-clarity .mc-clarity__task { display: block; min-width: 0; }
.app-shell .mc-clarity .today-next__context {
  margin: 0 0 14px; font-size: .6875rem; font-weight: 650; letter-spacing: .12em;
  color: var(--mc-ink-secondary);
}
.app-shell .mc-clarity .today-next__context::before { content: none; }
.app-shell .mc-clarity .mc-clarity__course {
  margin: 0 0 8px; padding: 0; border: 0; border-radius: 0;
  color: var(--mc-ink-secondary); background: transparent; font-size: .8125rem;
}
.app-shell .mc-clarity h2 {
  max-width: none; margin: 0 0 10px; font-size: clamp(1.25rem,2.3vw,1.65rem);
  font-weight: 650; letter-spacing: -.025em; line-height: 1.35; overflow-wrap: anywhere;
}
.app-shell .mc-clarity [data-next-copy] {
  display: block; margin: 0; max-width: 48ch;
  font-size: .875rem; line-height: 1.65; color: var(--mc-ink-secondary);
}
.app-shell .mc-clarity .mc-next-step {
  margin: 14px 0 0; padding: 0; border: 0; font-size: .875rem;
  line-height: 1.6; color: var(--mc-ink);
}
.app-shell .mc-clarity .mc-next-step:empty,
.app-shell .mc-clarity [data-home-start-status]:empty,
.app-shell .mc-clarity .mc-home-focus-sync:empty { display: none; }
.app-shell .mc-clarity .mc-next-options { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; }
.app-shell .mc-clarity .mc-next-options button {
  width: auto; min-width: 0; min-height: 44px; padding: 8px 0;
  border: 0; border-radius: 6px; background: transparent; font-size: .8125rem;
}
.app-shell .mc-clarity .mc-home-focus-dock {
  display: flex; flex-direction: column; align-items: stretch; gap: 10px; min-width: 0;
}
.app-shell .mc-clarity :is(.home-start-focus,.home-start-study) {
  order: 1; width: 100%; height: auto; min-width: 0 !important; min-height: 48px !important;
  margin: 0 !important; padding: 12px 16px !important; border-radius: 8px !important;
  flex-direction: row; font-size: .9375rem; font-weight: 600; line-height: 1.4;
  color: #fff !important; background: #5746bf !important; border: 1px solid transparent !important;
  box-shadow: none; transition: background-color 160ms ease;
}
.app-shell .mc-clarity :is(.home-start-focus,.home-start-study):hover:not(:disabled) { background: #4939a5 !important; transform: none; box-shadow: none; }
.app-shell .mc-clarity :is(.home-start-focus,.home-start-study):disabled { opacity: .65; cursor: wait; }
.app-shell .mc-clarity .mc-home-focus-countdown {
  order: 0; font-size: 1.75rem; font-variant-numeric: tabular-nums; color: var(--mc-ink);
}
.app-shell .mc-clarity .mc-home-time-controls { order: 2; width: 100%; text-align: left; }
.app-shell .mc-clarity .mc-home-time-controls > summary {
  min-height: 44px; padding: 12px 0; font-size: .8125rem;
  color: var(--mc-ink-secondary); cursor: pointer;
}
.app-shell .mc-clarity .mc-home-time-label {
  display: block; margin: 2px 0 8px; color: var(--mc-ink-secondary); font-size: .8125rem;
}
.mc-home-time-options { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; }
.mc-home-time-options button {
  min-width: 0; min-height: 44px; padding: 8px 2px; border: 1px solid var(--mc-line);
  border-radius: 6px; background: var(--mc-surface); color: var(--mc-ink);
  font: inherit; font-size: .75rem; cursor: pointer;
}
.app-shell .mc-home-time-options button[aria-pressed=true] {
  background: var(--coda-tint); color: var(--coda-accent); border-color: currentColor; font-weight: 700;
}
.mc-home-time-options button:disabled { opacity: .6; cursor: default; }
.app-shell .mc-clarity .mc-home-course-link { order: 3; padding: 8px 0; min-height: 44px; font-size: .8125rem; }
.app-shell .mc-clarity [data-home-study-cue] { font-size: .8125rem; line-height: 1.5; color: var(--mc-ink-secondary); }
.app-shell .mc-clarity :is([data-home-start-status],.mc-home-focus-sync) { order: 4; font-size: .8125rem; line-height: 1.5; }
.app-shell .mc-home-calm .mc-home-ready-tools { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.app-shell .mc-home-calm .mc-home-ready-tools .mc-button {
  display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px;
  width: 100%; min-width: 0; min-height: 64px; padding: 16px 20px !important;
  border: 1px solid var(--mc-line); border-radius: 10px; background: transparent;
  color: var(--mc-ink); font-size: .9375rem; font-weight: 550; line-height: 1.4; white-space: normal;
  box-shadow: none; transition: background-color 160ms ease;
}
.app-shell .mc-home-ready-tools .mc-button:hover { background: var(--mc-surface); }
.app-shell .mc-home-ready-tools svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; color: var(--coda-accent); }
.app-shell .mc-home-plan-link { justify-self: center; min-height: 44px; margin: 0 0 12px; padding: 10px 12px; font-size: .875rem; color: var(--mc-ink-secondary); }
.app-shell .mc-home-progress-disclosure,.app-shell .mc-home-rest { border-top: 1px solid var(--mc-line); }
.app-shell :is(.mc-home-progress-disclosure,.mc-home-rest) > summary {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 52px; padding: 12px 2px; font-size: .875rem; font-weight: 550;
  color: var(--mc-ink-secondary); cursor: pointer; list-style: none;
}
.app-shell :is(.mc-home-progress-disclosure,.mc-home-rest) > summary::-webkit-details-marker { display: none; }
.app-shell :is(.mc-home-progress-disclosure,.mc-home-rest) > summary::after { content: '+'; font-size: 1.2rem; font-weight: 400; }
.app-shell :is(.mc-home-progress-disclosure,.mc-home-rest)[open] > summary::after { content: '−'; }
.app-shell .mc-home-progress-disclosure .mc-home-progress { padding: 20px; border: 1px solid var(--mc-line); border-radius: 10px; background: var(--mc-surface); }
.app-shell .mc-home-calm :is(.mc-home-disclosure,.mc-home-shortcuts .mc-button) { border-radius: 10px; box-shadow: none; }
.app-shell .mc-home-calm :is(button,select,summary):focus-visible { outline: 3px solid var(--coda-accent); outline-offset: 4px; }
.app-shell .mc-home-calm [hidden] { display: none !important; }
.app-shell[data-active-view=home] .app-sidebar { background: var(--mc-pearl); box-shadow: none; }
.app-shell[data-active-view=home] .mc-nav__item { border-radius: 8px; box-shadow: none; }
.app-shell[data-active-view=home] .mc-nav--mobile { border-radius: 12px; background: var(--mc-surface); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
@media(max-width:700px) {
  .app-shell [data-view=home] .today-header { margin: 4px 0 24px; align-items: flex-start; }
  .app-shell [data-view=home] .today-header .page-header__actions { flex: none; width: auto; }
  .app-shell .mc-home-calm > .mc-clarity { padding: 22px; }
  .app-shell .mc-clarity .today-next__body { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .app-shell .mc-clarity .mc-home-focus-dock { gap: 4px; }
  .app-shell .mc-clarity .mc-home-time-controls { max-width: none; }
  .app-shell .mc-clarity .mc-home-time-options { gap: 8px; }
  .app-shell .mc-home-calm .mc-home-ready-tools { gap: 10px; }
  .app-shell .mc-home-calm .mc-home-ready-tools .mc-button { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px !important; }
  .app-shell .mc-home-rest__hint { display: none; }
}
@media(max-width:360px) { .app-shell .mc-home-calm > .mc-clarity { padding: 18px; } }
@media(prefers-reduced-motion:reduce) { .app-shell .mc-home-calm * { transition: none !important; } }
:root[data-reduced-motion=true] .app-shell .mc-home-calm * { transition: none !important; }
@media(forced-colors:active) {
  .app-shell .mc-clarity :is(.home-start-focus,.home-start-study) { color: ButtonText !important; background: ButtonFace !important; border-color: ButtonText !important; }
  .app-shell .mc-home-ready-tools .mc-button { border-color: ButtonText; }
}

/* One meaningful visual anchor: existing Coda artwork and real session days.
   No extra request, perpetual animation, percentage, or completion target. */
.app-shell .mc-clarity .today-next__body { grid-template-columns: minmax(0,1fr) 180px; align-items: center; gap: 16px 28px; }
.app-shell .mc-clarity .mc-home-focus-dock { grid-column: 1 / -1; align-items: flex-start; gap: 4px; }
.app-shell .mc-clarity .mc-home-focus-dock :is(.home-start-focus,.home-start-study) { width: min(100%,260px); }
.app-shell .mc-clarity .mc-home-time-controls { max-width: 260px; }
.app-shell .mc-home-momentum { margin: -12px -4px 0; width: 100%; min-width: 0; text-align: center; }
.app-shell .mc-momentum__scene { position: relative; display: grid; place-items: center; height: 154px; isolation: isolate; }
.app-shell .mc-momentum__scene::before { content: ''; position: absolute; z-index: -1; inset: 15% 7%; border-radius: 50%; background: radial-gradient(ellipse,color-mix(in srgb,var(--coda-violet) 12%,transparent),transparent 70%); }
.app-shell .mc-momentum__scene img { position: relative; width: 150px; height: auto; max-width: 100%; object-fit: contain; }
.app-shell .mc-momentum__orbit { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--coda-edge); stroke-width: 1; stroke-dasharray: 3 5; }
.app-shell .mc-momentum__spark { position: absolute; top: 10px; right: 12px; color: var(--coda-violet); font-size: 22px; }
.app-shell .mc-momentum__trail { position: relative; display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 4px; list-style: none; margin: 2px 4px 8px; padding: 0; }
.app-shell .mc-momentum__trail::before { content: ''; position: absolute; left: 7%; right: 7%; top: 5px; height: 1px; background: var(--mc-line); }
.app-shell .mc-momentum__trail li { position: relative; display: grid; justify-items: center; gap: 6px; font-size: .625rem; line-height: 1.2; color: var(--mc-ink-secondary); }
.app-shell .mc-momentum__dot { width: 10px; height: 10px; border: 1px solid var(--mc-line-strong); border-radius: 50%; background: var(--mc-surface); box-sizing: border-box; }
.app-shell .mc-momentum__trail .is-complete .mc-momentum__dot { background: var(--coda-accent); border-color: var(--coda-accent); box-shadow: 0 0 0 3px color-mix(in srgb,var(--coda-accent) 10%,transparent); }
.app-shell .mc-momentum__trail .is-today > span:last-child { color: var(--mc-ink); font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.app-shell .mc-home-momentum figcaption { color: var(--mc-ink-secondary); font-size: .6875rem; line-height: 1.5; text-wrap: balance; }
@media(max-width:700px) {
 .app-shell .mc-clarity .today-next__body { grid-template-columns: minmax(0,1fr) 104px; gap: 18px 12px; }
 .app-shell .mc-home-momentum { margin: -4px -2px 0; }
 .app-shell .mc-momentum__scene { height: 98px; }
 .app-shell .mc-momentum__scene img { width: 100px; }
 .app-shell .mc-momentum__spark { top: 0; right: 0; font-size: 16px; }
 .app-shell .mc-momentum__trail { margin-inline: 0; gap: 2px; }
 .app-shell .mc-momentum__dot { width: 8px; height: 8px; }
 .app-shell .mc-momentum__trail::before { top: 4px; }
 .app-shell .mc-home-momentum figcaption { font-size: .625rem; }
 .app-shell .mc-clarity .mc-home-focus-dock :is(.home-start-focus,.home-start-study) { width: 100%; }
 .app-shell .mc-clarity .mc-home-time-controls { max-width: none; }
}
@media(max-width:360px) {
 .app-shell .mc-clarity .today-next__body { grid-template-columns: minmax(0,1fr) 84px; gap: 16px 10px; }
 .app-shell .mc-momentum__scene { height: 84px; }
 .app-shell .mc-momentum__scene img { width: 84px; }
 .app-shell .mc-clarity h2 { font-size: 1.125rem; }
}
@media(prefers-contrast:more) { .app-shell .mc-momentum__dot { border-color: var(--mc-ink); }.app-shell .mc-momentum__scene::before { display: none; } }
@media(forced-colors:active) { .app-shell .mc-momentum__trail .is-complete .mc-momentum__dot { background: Highlight; border-color: Highlight; box-shadow: none; } }

.app-shell .mc-clarity .mc-home-study-help { order: 2; min-height: 44px; padding: 8px 0; font-size: .875rem; color: var(--coda-accent); }
.app-shell .mc-clarity .mc-home-time-controls { order: 3; }
.app-shell .mc-home-focus-alternative { width: 100%; min-height: 44px; margin-top: 10px; border-radius: 8px; }

/* Phase 1 keeps one Next Up card and the existing Aurora components. */
.app-shell .mc-clarity .home-start-focus { order: 0; }
.app-shell .mc-clarity .home-start-study { order: 1; color: var(--mc-ink) !important; background: var(--mc-surface) !important; border: 1px solid var(--mc-line-strong) !important; }
.app-shell .mc-clarity .home-start-study:hover:not(:disabled) { background: var(--mc-surface-raised, var(--mc-surface)) !important; }
.app-shell .mc-clarity .mc-home-resume { order: 2; display: flex; flex-direction: column; align-items: flex-start; max-width: 100%; min-height: 44px; padding: 8px 0; text-align: left; white-space: normal; }
.app-shell .mc-clarity .mc-home-resume[hidden] { display: none; }
.app-shell .mc-home-resume small { max-width: 100%; font-size: .75rem; color: var(--mc-ink-secondary); overflow-wrap: anywhere; }
.app-shell .mc-clarity .mc-home-study-help { order: 3; }
.app-shell .mc-clarity .mc-home-time-controls { order: 4; }
.app-shell .mc-clarity [data-home-resume-status] { order: 5; }
.mc-home-recommendation-details { margin-top: 8px; font-size: .8125rem; line-height: 1.5; color: var(--mc-ink-secondary); }
.mc-home-recommendation-details summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--mc-ink); }
.mc-home-recommendation-details p { margin: 0 0 8px; max-width: 65ch; }
.app-shell .course-progress-details { margin-top: 20px; border-top: 1px solid var(--mc-line); }
.app-shell .course-progress-details > summary { padding: 14px 0; min-height: 48px; color: var(--mc-ink-secondary); font-size: .875rem; cursor: pointer; }
.app-shell .course-progress-details > summary:focus-visible { outline: 3px solid var(--coda-accent); outline-offset: 3px; }

/* Course material is the destination; course administration stays secondary. */
.app-shell[data-active-view=study] [data-view=study]:has([data-course-detail-pane]:not([hidden])) .study-page-header { margin: 0 0 10px; padding: 0; min-height: 0; border: 0; }
.app-shell[data-active-view=study] [data-view=study]:has([data-course-detail-pane]:not([hidden])) .study-page-header :is(.page-kicker,.page-header__actions) { display: none; }
.app-shell[data-active-view=study] [data-view=study]:has([data-course-detail-pane]:not([hidden])) .study-page-header h1 { margin: 0; font-size: 1.125rem; }
.app-shell .course-detail-hero { padding: 18px; border-radius: 12px; box-shadow: none; gap: 14px; }
.app-shell .course-detail-hero__identity { gap: 10px; }
.app-shell .course-detail-hero .course-mark--large { width: 36px; height: 36px; }
.app-shell .course-detail-hero h2 { font-size: clamp(1.25rem,2vw,1.6rem); margin: 0; line-height: 1.3; }
.app-shell .course-detail-hero .eyebrow { margin-bottom: 4px; }
.app-shell .course-detail-hero__actions { gap: 8px; }
.app-shell .course-detail-hero__actions > .mc-button { min-height: 44px; padding: 10px 14px; }
.app-shell .course-back { margin: 0 0 10px; padding-block: 8px; min-height: 44px; }
.app-shell .course-disclosures > .course-disclosure:first-child > summary { min-height: 56px; padding-block: 12px; }
.app-shell .course-material-reader summary { min-height: 44px; padding-block: 10px; }
.app-shell .course-material-reader p { font-size: 1rem; line-height: 1.7; }

/* Native disclosure stays inline and uses the existing theme in every mode. */
.mc-home-recommendation-details summary:focus-visible { outline: 2px solid var(--mc-ink); outline-offset: 3px; border-radius: 6px; }
.mc-home-recommendation-details ul { margin: 0 0 8px; padding-inline-start: 20px; max-width: 65ch; overflow-wrap: anywhere; }
.mc-home-recommendation-details li + li { margin-top: 4px; }
